Skip to content

Commit

Permalink
[RISCV] Remove getOffsetOfLocalArea() (llvm#93765)
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 authored Jun 17, 2024
1 parent 525318e commit 94a6b9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 94a6b9c

Please sign in to comment.