[llvm] [GlobalMerge] Add MinSize feature to the GlobalMerge Pass. (PR #93686)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 07:42:13 PDT 2024


topperc wrote:

> I don't remember off the top of my head what SmallDataLimit represents, and am not finding it documented in LangRef.  Is this related to GP relative addressing?  Or something else?
> 
> 
> 
> Code wise, this looks pretty straight forward.  I just want to make sure I understand the intent.  

It controls what variables end up in the .sdata and .sbss sections. Where s means small. Those sections are placed together and GP is placed somewhere in the middle so that GP relative addressing can apply to variables in those sections.

The intent here is for global merge to not prevent small variables from being placed in sdata or sbss.

https://github.com/llvm/llvm-project/pull/93686


More information about the llvm-commits mailing list