[llvm] [RISCV] Use SP-relative Accesses with frame pointers (PR #171780)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 11 01:46:45 PST 2025


lenary wrote:

This also potentially allows the use of `c.addi4spn`

Code size metrics:
- We were seeing a code size increase of around 4.5% on average when enabling frame pointers.
- This claws back some of that increase. We think somewhere from 0-2.5 percentage points depending on the workload, but we don't have final numbers.

Looking at the regressions in the in-tree tests:
- We have a problem with vector spill addresses being incorrectly calculated, I think.
- We should not do this if the frame size is too large? Finding a good threshold for this might be hard. I guess if the Frame size is over 256 for rv32, and 512 for rv64?


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


More information about the llvm-commits mailing list