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. >I am building a transformation on top of releases/gcc-11, maybe newer >commits address this, but I haven't seen a discussion in this mailing >list. Perhaps in patches, but I don't follow that mailing list too >closely. > >Thanks, any help is appreciated!