[PATCH] D157373: [RISCV] add a compress optimization for stack inst.
lcvon via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 19:35:26 PDT 2023
lcvon007 added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:1324
+ // Avoid increasing extra instructions when ld/st can be compressed.
+ if ((CSI.size() <= RVCompressLen) &&
+ (StackSize <= 2048 + RVCompressLen ||
----------------
craig.topper wrote:
> Isn't CSI.size() the number of registers being saved? RVCompressLen is 256 or 512. Won't CSI.size() always be less than that? They aren't the same units.
you're right and they're the same units, and CSI.size is always less than RVCompressLen, I have removed this check , thanks for your advice.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157373/new/
https://reviews.llvm.org/D157373
More information about the llvm-commits
mailing list