Skip to content

Commit 9fafb08

Browse files
committed
Make updateLRRestored a static function
1 parent 5d888bf commit 9fafb08

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

llvm/lib/Target/ARM/ARMFrameLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2781,7 +2781,7 @@ void ARMFrameLowering::determineCalleeSaves(MachineFunction &MF,
27812781
AFI->setLRIsSpilled(SavedRegs.test(ARM::LR));
27822782
}
27832783

2784-
void ARMFrameLowering::updateLRRestored(MachineFunction &MF) const {
2784+
void ARMFrameLowering::updateLRRestored(MachineFunction &MF) {
27852785
MachineFrameInfo &MFI = MF.getFrameInfo();
27862786
if (!MFI.isCalleeSavedInfoValid())
27872787
return;

llvm/lib/Target/ARM/ARMFrameLowering.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ARMFrameLowering : public TargetFrameLowering {
6161

6262
/// Update the IsRestored flag on LR if it is spilled, based on the return
6363
/// instructions.
64-
void updateLRRestored(MachineFunction &MF) const;
64+
static void updateLRRestored(MachineFunction &MF);
6565

6666
void processFunctionBeforeFrameFinalized(
6767
MachineFunction &MF, RegScavenger *RS = nullptr) const override;

llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,7 @@ bool ARMLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
21242124
// the instruction(s) we changed, because there may be other BX returns which
21252125
// still need LR to be restored.
21262126
if (ModifiedLDMReturn)
2127-
Fn.getSubtarget<ARMSubtarget>().getFrameLowering()->updateLRRestored(Fn);
2127+
ARMFrameLowering::updateLRRestored(Fn);
21282128

21292129
Allocator.DestroyAll();
21302130
return Modified;

0 commit comments

Comments
 (0)