On June 30, 2021 6:28:29 PM GMT+02:00, Erick Ochoa <eoc...@gcc.gnu.org> wrote: >On Wed, 30 Jun 2021 at 17:06, Richard Biener ><richard.guent...@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?
By looking at the associated varpool node. Richard.