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

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 07:45:33 PDT 2024


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

An address must be loaded from a small section if its size is less than the SmallDataLimit. Data in this section could be addressed by using gp_rel.

I have measured that basing the default GlobalMergeMinDataSize off of SmallDataLimit has beneficial effects compared to other default values. I measured a bunch of different defaults (0, 4, 5, 8, 9, 16, 17, ... 512, SmallDataLimit) and Small DataLimit did the trick.

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


More information about the llvm-commits mailing list