Skip to content

Commit

Permalink
[RISCV] Remove getOffsetOfLocalArea()
Browse files Browse the repository at this point in the history
For RISC-V, it's always 0 and I don't see any reason we will
change it in the future.
  • Loading branch information
wangpc-pp committed May 30, 2024
1 parent 815250b commit 49a12b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,9 +878,8 @@ 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());
Offset = StackOffset::getFixed(MFI.getObjectOffset(FI) +
MFI.getOffsetAdjustment());
} else if (StackID == TargetStackID::ScalableVector) {
Offset = StackOffset::getScalable(MFI.getObjectOffset(FI));
}
Expand Down

0 comments on commit 49a12b8

Please sign in to comment.