From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTPS id 2A4723858404 for ; Tue, 9 Nov 2021 15:28:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2A4723858404 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-501-lzoJJCkcOf69fR7U-YBo7g-1; Tue, 09 Nov 2021 10:28:36 -0500 X-MC-Unique: lzoJJCkcOf69fR7U-YBo7g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 069DC10151ED; Tue, 9 Nov 2021 15:28:35 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8CD44100EB3D; Tue, 9 Nov 2021 15:28:34 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 1A9FSVDh1606532 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 9 Nov 2021 16:28:31 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 1A9FST1X1606531; Tue, 9 Nov 2021 16:28:29 +0100 Date: Tue, 9 Nov 2021 16:28:29 +0100 From: Jakub Jelinek To: Andrew MacLeod Cc: Richard Biener , Aldy Hernandez , gcc-patches@gcc.gnu.org, John David Anglin , Iain Sandoe Subject: Re: [PATCH] pch: Add support for PCH for relocatable executables Message-ID: <20211109152829.GV2710@tucnak> Reply-To: Jakub Jelinek References: <20211108114604.GI2710@tucnak> <20211108194807.GJ2710@tucnak> <6n83494-274o-4r5r-552n-8195p08748o7@fhfr.qr> <20211109094445.GN2710@tucnak> <20211109113208.GP2710@tucnak> <56823174-1nn6-5613-q640-p01pqn63q24q@fhfr.qr> <20211109122910.GR2710@tucnak> <20211109145847.GS2710@tucnak> <60f47e3b-a522-34d7-ea3e-5ed77b5c8fd8@redhat.com> MIME-Version: 1.0 In-Reply-To: <60f47e3b-a522-34d7-ea3e-5ed77b5c8fd8@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2021 15:28:42 -0000 On Tue, Nov 09, 2021 at 10:23:19AM -0500, Andrew MacLeod wrote: > yeah, that doesnt work because range_query is a pure virtual. However, there > also does not seem to be any reason why we need to jump thru hoops since > get_range_query() doesn't need to be in function.h..   If I relocate it to > value-query.h like so it seems to work quite well...   How about this? Ah, ok. Indeed while one can extern global_range_query global_ranges; with incomplete global_range_query type, inheritance will not be known. > --- a/gcc/value-query.h > +++ b/gcc/value-query.h > @@ -127,6 +127,17 @@ public: > }; > > extern global_range_query global_ranges; > +inline range_query *get_global_range_query () { return &global_ranges; } Formatting, there should be empty line after global_ranges, and inline range_query * get_global_range_entry () { return &global_ranges; } > + > +/* Returns the currently active range access class. When there is no active > + range class, global ranges are used. Never returns null. */ > + > +ATTRIBUTE_RETURNS_NONNULL inline range_query * > +get_range_query (const struct function *fun) > +{ > + return fun->x_range_query ? fun->x_range_query : &global_ranges; > +} > + > extern value_range gimple_range_global (tree name); > extern bool update_global_range (irange &r, tree name); > Ok for trunk with the above nits fixed if it passes bootstrap/regtest, thanks. Jakub