Are DECL_UIDs for the same across partitions during LGEN?

Erick Ochoa eochoa@gcc.gnu.org
Wed Jun 30 16:28:29 GMT 2021


On Wed, 30 Jun 2021 at 17:06, Richard Biener <richard.guenther@gmail.com> wrote:
>
> On June 30, 2021 4:07:00 PM GMT+02:00, Erick Ochoa via Gcc <gcc@gcc.gnu.org> wrote:
> >Hi,
> >
> >I am still working on understanding the LTO framework and how the
> >gimple representation works across multiple partitions. I found myself
> >printing all global variables and printing their DECL_UID. I noticed
> >that for some variables, their DECL_UIDs were different across
> >different partitions. That is, a single global variable has different
> >DECL_UIDs in different partitions. Is this the correct behaviour?
>
> Yes.
>
> My
> >understanding of DECL_UID is that for every declaration there is a
> >unique identifier, but is this not the case during LTO?
>
> It's also true for WPA and LTrans a variables UID is just not the same in all of them because there's no way to ensure that.
>

So how would I be able to say that two different declarations are the
same variable?


More information about the Gcc mailing list