[llvm] [RISCV] Remove getOffsetOfLocalArea() (PR #93765)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 21:41:57 PDT 2024
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/93765
>From 9cc760bc4d8aec66085986df606c899561ab1f60 Mon Sep 17 00:00:00 2001
From: Wang Pengcheng <wangpengcheng.pp at bytedance.com>
Date: Thu, 30 May 2024 12:09:30 +0800
Subject: [PATCH] [RISCV] Remove getOffsetOfLocalArea()
For RISC-V, it's always 0 and I don't see any reason we will
change it in the future.
---
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
index 436bd4a38a319..e676c2f94583d 100644
--- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -878,9 +878,9 @@ RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
StackID == TargetStackID::ScalableVector) &&
"Unexpected stack ID for the frame object.");
if (StackID == TargetStackID::Default) {
- Offset =
- StackOffset::getFixed(MFI.getObjectOffset(FI) - getOffsetOfLocalArea() +
- MFI.getOffsetAdjustment());
+ assert(getOffsetOfLocalArea() == 0 && "LocalAreaOffset is not 0!");
+ Offset = StackOffset::getFixed(MFI.getObjectOffset(FI) +
+ MFI.getOffsetAdjustment());
} else if (StackID == TargetStackID::ScalableVector) {
Offset = StackOffset::getScalable(MFI.getObjectOffset(FI));
}
More information about the llvm-commits
mailing list