[llvm] 5555b9f - [RISCV] Reuse FrameIdx for emitting cfi offset. NFC.
Jim Lin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 25 17:34:14 PDT 2023
Author: Jim Lin
Date: 2023-07-26T08:33:58+08:00
New Revision: 5555b9f739be9a19290a38a98b2a432330f6a367
URL: https://github.com/llvm/llvm-project/commit/5555b9f739be9a19290a38a98b2a432330f6a367
DIFF: https://github.com/llvm/llvm-project/commit/5555b9f739be9a19290a38a98b2a432330f6a367.diff
LOG: [RISCV] Reuse FrameIdx for emitting cfi offset. NFC.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
index ca2d9474d1edfd..9c424423eb4a38 100644
--- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -584,7 +584,7 @@ void RISCVFrameLowering::emitPrologue(MachineFunction &MF,
if (FrameIdx < 0)
Offset = FrameIdx * (int64_t) STI.getXLen() / 8;
else
- Offset = MFI.getObjectOffset(Entry.getFrameIdx()) -
+ Offset = MFI.getObjectOffset(FrameIdx) -
RVFI->getLibCallStackSize();
Register Reg = Entry.getReg();
unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(
More information about the llvm-commits
mailing list