[PATCH] D79141: [RISCV] Better Split Stack Pointer Adjustment for RVC
Sam Elliott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 07:21:28 PDT 2020
lenary marked an inline comment as done.
lenary added a comment.
In D79141#2012099 <https://reviews.llvm.org/D79141#2012099>, @shiva0217 wrote:
> Got your point. The logic is not only for addressable but also for preference for code size.
Yeah. I think there could be an argument for using `512` for the threshold on RV64*C, but tbh the difference between these a threshold of 512 and of 496 will not have a huge effect on overall program size in most programs. This trades-off the size of the final `addi sp, sp, <threshold>` against how well you can compress the save/restore functions, and it's fairly unlikely you need the entire addresable range of the save/restore instructions anyway. I think we're talking a few bytes in functions with StackSize of 512 (the only stack size in that range that is well-aligned).
I think I would need to see benchmarks before I could say one was specifically better than the other.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79141/new/
https://reviews.llvm.org/D79141
More information about the llvm-commits
mailing list