public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Are DECL_UIDs for the same across partitions during LGEN?
@ 2021-06-30 14:07 Erick Ochoa
  2021-06-30 15:05 ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Erick Ochoa @ 2021-06-30 14:07 UTC (permalink / raw)
  To: gcc

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? My
understanding of DECL_UID is that for every declaration there is a
unique identifier, but is this not the case during LTO?

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!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Are DECL_UIDs for the same across partitions during LGEN?
  2021-06-30 14:07 Are DECL_UIDs for the same across partitions during LGEN? Erick Ochoa
@ 2021-06-30 15:05 ` Richard Biener
  2021-06-30 16:28   ` Erick Ochoa
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Biener @ 2021-06-30 15:05 UTC (permalink / raw)
  To: Erick Ochoa, Erick Ochoa via Gcc, gcc

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!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Are DECL_UIDs for the same across partitions during LGEN?
  2021-06-30 15:05 ` Richard Biener
@ 2021-06-30 16:28   ` Erick Ochoa
  2021-06-30 17:38     ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Erick Ochoa @ 2021-06-30 16:28 UTC (permalink / raw)
  To: Richard Biener; +Cc: Erick Ochoa via Gcc

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Are DECL_UIDs for the same across partitions during LGEN?
  2021-06-30 16:28   ` Erick Ochoa
@ 2021-06-30 17:38     ` Richard Biener
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Biener @ 2021-06-30 17:38 UTC (permalink / raw)
  To: Erick Ochoa; +Cc: Erick Ochoa via Gcc

On June 30, 2021 6:28:29 PM GMT+02:00, Erick Ochoa <eochoa@gcc.gnu.org> wrote:
>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?

By looking at the associated varpool node. 

Richard. 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-30 17:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 14:07 Are DECL_UIDs for the same across partitions during LGEN? Erick Ochoa
2021-06-30 15:05 ` Richard Biener
2021-06-30 16:28   ` Erick Ochoa
2021-06-30 17:38     ` Richard Biener

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).