[PATCH] D134599: [RISCV] Readjusting the framestack for Zcmp
Yeting Kuo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 01:33:05 PDT 2023
fakepaper56 added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:1377
+ }
+ RVFI->setRVPushStackSize(PoshPopRegs * (IsRV64 ? 8 : 4));
+
----------------
IMHO, is it possible the callee save register needed spilled are not successive, like {ra, s0, s3}?
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:280
+
+ // Use available stack adjustment in Zc PUSH/POP instruction
+ // to allocate/deallocate space on stack.
----------------
kito-cheng wrote:
> Zcmp
How about rewriting to `Spimm = std::min(StackAdjust - StackAdjBase, 48);` ?
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:300
+
+// Checks if Zc PUSH/POP instructions can be used with the given CSI.
+bool RISCVFrameLowering::isCSIpushable(
----------------
kito-cheng wrote:
> Zcmp
Could the for loop be refined to any_of ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134599/new/
https://reviews.llvm.org/D134599
More information about the llvm-commits
mailing list