public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Erick Ochoa <eochoa@gcc.gnu.org>, Jan Hubicka <hubicka@ucw.cz>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: tree decl stored during LGEN does not map to a symtab_node during WPA
Date: Fri, 9 Jul 2021 11:49:37 +0200	[thread overview]
Message-ID: <CAFiYyc1_fObd_F30YCUfRSOLDj=TQS_1ZsGp=GW4QsotL7FHwA@mail.gmail.com> (raw)
In-Reply-To: <CAJ_nqziQwNwdZUrC8-KBQMy5uVVt3PVi4h46c+kpJ+i3e3Rf3w@mail.gmail.com>

On Fri, Jul 9, 2021 at 9:52 AM Erick Ochoa via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hi, I noticed this is also happening also for local variables. Again,
> storing tree declarations on a summary during LGEN and then at WPA
> time reading from those summaries. I can print the declaration, but
> when I try to look for its node in the symtab I get NULL as the return
> value.
>
> Any help is appreciated. Thanks!

I'm not too familiar with it but I think you're supposed to stream encoded
symtab references during LGEN/WPA, the decls are subject to symtab
merging and I'm not quite sure that happens when you read your
summaries.

Note locals do not have carpool nodes.

Richard.

> On Wed, 7 Jul 2021 at 11:27, Erick Ochoa <eochoa@gcc.gnu.org> wrote:
> >
> > Hi,
> >
> > I am saving some tree declarations during LGEN that I will be later
> > analyzing at WPA time. I am able to read the decl from my summaries
> > and print it at WPA time. It corresponds to a global variable.
> > However, whenever I use symtab_node::get (decl) during WPA time I keep
> > getting NULL.
> >
> > Does anyone know why that might be the case? Is it possible that other
> > optimizations are rewriting global variables during LGEN (or prior
> > WPA)? The variable I am looking at is a static const char typeinfo
> > name for a class in the program I am analyzing. I don't think this is
> > an issue since other type info names have an associated symtab_node.
> >
> > Thanks!

  reply	other threads:[~2021-07-09  9:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07  9:27 Erick Ochoa
2021-07-09  7:51 ` Erick Ochoa
2021-07-09  9:49   ` Richard Biener [this message]
2021-07-12 10:55     ` Erick Ochoa
2021-07-13  9:21       ` Erick Ochoa
2021-07-13  9:41         ` Richard Biener
2021-07-13 10:49           ` Erick Ochoa
2021-07-13 12:55             ` Richard Biener
2021-07-14 13:56               ` Erick Ochoa
2021-07-15  7:23                 ` Richard Biener
2021-07-21 16:55                   ` Erick Ochoa
2021-07-22 11:40                     ` Richard Biener
2021-07-22 12:04                       ` Erick Ochoa
2021-07-22 12:08                         ` Erick Ochoa
2021-07-22 12:23                         ` Richard Biener
2021-07-22 12:33                           ` Erick Ochoa
2021-07-22 12:48                             ` Richard Biener
2021-07-22 14:32                               ` Erick Ochoa
2021-07-28 10:35                                 ` Richard Biener
2021-07-13 11:56           ` Erick Ochoa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc1_fObd_F30YCUfRSOLDj=TQS_1ZsGp=GW4QsotL7FHwA@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=eochoa@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).