[PATCH] D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore

Shiva Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 18:46:16 PDT 2019


shiva0217 marked 2 inline comments as done.
shiva0217 added inline comments.


================
Comment at: lib/Target/RISCV/RISCVFrameLowering.cpp:180
 
+  // Emit the second SP adjustment after restoring callee saved registers.
+  if (FirstSPAdjustAmount) {
----------------
luismarques wrote:
> This is the prologue so it should say "after saving", not "after restoring".
Thanks for catching this.


================
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
----------------
luismarques wrote:
> 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.
Ok, we could update the test when the stack estimation changing.


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