[PATCH] D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 05:07:17 PDT 2019
luismarques accepted this revision.
luismarques added a comment.
This revision is now accepted and ready to land.
LGTM, after fixing the comment.
================
Comment at: lib/Target/RISCV/RISCVFrameLowering.cpp:180
+ // Emit the second SP adjustment after restoring callee saved registers.
+ if (FirstSPAdjustAmount) {
----------------
This is the prologue so it should say "after saving", not "after restoring".
================
Comment at: test/CodeGen/RISCV/split-sp-adjust.ll:20
+entry:
+ %xx = alloca [2028 x i8], align 1
+ %0 = getelementptr inbounds [2028 x i8], [2028 x i8]* %xx, i32 0, i32 0
----------------
This test would be more clear if the alloca size and the computed stack size better matched, but `getStackSize` is overestimating the size, as indicated in a comment copied from Lanai. I think this can be committed as is, but we should investigate that stack overallocation and if/when we fix that we should adjust this test.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68011/new/
https://reviews.llvm.org/D68011
More information about the llvm-commits
mailing list