[PATCH] D130560: [RISCV] Handle register spill in branch relaxation
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 5 08:37:15 PDT 2022
StephenFan added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:1075
ScavSlotsNum = std::max(ScavSlotsNum, getScavSlotsNumForRVV(MF));
for (unsigned i = 0; i < ScavSlotsNum; i++) {
+ int FI = MFI.CreateStackObject(RegInfo->getSpillSize(*RC),
----------------
Capitalize i
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:1080
+
+ if (IsLargeFunction && i == 0)
+ RVFI->setBranchRelaxationScratchFrameIndex(FI);
----------------
piggynl wrote:
> Do we need this `IsLargeFunction`?
I think we need.
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:1080
+
+ if (IsLargeFunction && i == 0)
+ RVFI->setBranchRelaxationScratchFrameIndex(FI);
----------------
StephenFan wrote:
> piggynl wrote:
> > Do we need this `IsLargeFunction`?
> I think we need.
Is this more readable?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130560/new/
https://reviews.llvm.org/D130560
More information about the llvm-commits
mailing list