[PATCH] D152279: [Driver] Default -msmall-data-limit= to 0

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 16:59:57 PDT 2023


MaskRay added a comment.

In D152279#4612099 <https://reviews.llvm.org/D152279#4612099>, @craig.topper wrote:

> In D152279#4612087 <https://reviews.llvm.org/D152279#4612087>, @MaskRay wrote:
>
>> I am still interested in moving this forward. What should be done here? If the decision is to keep the current odd default 8 for `toolchains::RISCVToolChain`, I guess I'll have to take the compromise as making a step forward is better than nothing.
>
> On 1 RV64 CPU I tried in our RTL simulator, changing from 8 to 0 reduced dhrystone score by 2.7%. Using 16, or 32 gave the same score as 8. Reducing 8 to 4 improved the score by 0.5%.

Thank you for sharing the benchmarks!

My view is that global pointer relaxation is an expert option that the user needs to tune (like that ld.lld doesn't default to `--relax-gp`).
People can create more articles about global pointer relaxation usage, and make the default out of the business of the driver.
If anyone tells me sdata/srodata/sbss adoption for other languages' compiler drivers, I'll definitely tell them not to copy the 0/8 complex rules in clang driver:)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152279/new/

https://reviews.llvm.org/D152279



More information about the cfe-commits mailing list