This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to check if two symbols are from same source unit during WPA ?


> 
> What happens in practice?  GCC doesn't put functions in random
> partitions.
> 

The data goes into a separate partition AFAIU - it means that all data accesses are as though they are extern references which means there's not necessarily any CSE'ing ability that's available with section anchors.

>> If it's not desired by default could we gate it on an option ?
>> AFIAU, section anchors optimization is important for ARM and AArch64.
> 
> For code size or for performance?  I wonder why section anchors cannot
> be "implemented" using some special relocations and thus as linker
> optimization.

For performance (and probably code size too) as you can end up CSE'ing the anchor point. the difference in performance with -flto-partitions=1 is visible on quite a few of the spec2k benchmarks. I don't remember which ones immediately but yeah it makes a difference.

Ramana
> 
> Richard.
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]