From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1710 invoked by alias); 3 Sep 2011 19:10:36 -0000 Received: (qmail 1701 invoked by uid 22791); 3 Sep 2011 19:10:36 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gw0-f47.google.com (HELO mail-gw0-f47.google.com) (74.125.83.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 03 Sep 2011 19:10:22 +0000 Received: by gwb11 with SMTP id 11so2311660gwb.20 for ; Sat, 03 Sep 2011 12:10:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.243.9 with SMTP id q9mr2071933ybh.52.1315077021548; Sat, 03 Sep 2011 12:10:21 -0700 (PDT) Received: by 10.151.84.14 with HTTP; Sat, 3 Sep 2011 12:10:21 -0700 (PDT) In-Reply-To: References: Date: Sat, 03 Sep 2011 19:10:00 -0000 Message-ID: Subject: Re: rfa: remove get_var_ann (was: Fix PR50260) From: Richard Guenther To: Michael Matz Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00225.txt.bz2 On Sat, Sep 3, 2011 at 5:31 PM, Michael Matz wrote: > Hi, > > On Sat, 3 Sep 2011, Richard Guenther wrote: > >> >> As I feared the call to get_var_ann in set_is_used right now really >> >> is still needed, privatizing it hence isn't that straight forward. >> > >> > After pondering I concluded that it's not necessary to call >> > set_is_used for variables without var annotation. =A0Those won't be in >> > referenced_vars (or local_decls) and therefore also won't be removed >> > from those lists no matter how hard we try. >> > >> > Regstrapped on x86_64-linux (without Ada). =A0Okay for trunk? >> >> No. =A0We call mark_all_vars_used on trees contained in GIMPLE non-debug >> statements. =A0All vars we can reach that way _have_ to be in the list of >> referenced vars. > > Sometimes global variables (non-auto vars with context !=3D cfun) can be > missing from referenced_vars. =A0In the case where we hit bugs with this > it's the non-local variables generated for profile counters. =A0I can add > the respective add_referenced_var calls for that, but I'm not sure I see > the point. =A0That of course comes back to our old discussion for what > purposes referenced_vars actually is used. =A0I looked at all users and I > think that the global counters missing from referenced_vars is harmless. > > OTOH it's a nice invariant that can actually be checked for (that all > reachable vars whatsoever have to be in referenced_vars), so I'm going to > do that. Yes, until we get rid of referenced_vars (which we still should do at some point...) that's the best. IIRC we have some verification code even, and wonder why = it doesn't trigger. Richard. >> That they are not is the bug. So - can you investigate >> which var doesn't have an annotation an why it isn't in referenced vars? > > > Ciao, > Michael.