Skip to content

Commit c9f4754

Browse files
committed
Update AArch64FrameLowering.cpp
1 parent f4a673d commit c9f4754

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,16 +1012,6 @@ void AArch64FrameLowering::emitZeroCallUsedRegs(BitVector RegsToZero,
10121012
}
10131013
}
10141014

1015-
static void getLiveRegsForEntryMBB(LiveRegUnits &LiveRegs,
1016-
const MachineBasicBlock &MBB) {
1017-
const MachineFunction *MF = MBB.getParent();
1018-
1019-
// Mark callee saved registers as used so we will not choose them.
1020-
const MCPhysReg *CSRegs = MF->getRegInfo().getCalleeSavedRegs();
1021-
for (unsigned i = 0; CSRegs[i]; ++i)
1022-
LiveRegs.addReg(CSRegs[i]);
1023-
}
1024-
10251015
// Find a scratch register that we can use at the start of the prologue to
10261016
// re-align the stack pointer. We avoid using callee-save registers since they
10271017
// may appear to be free when this is called from canUseAsPrologue (during
@@ -1046,6 +1036,7 @@ static Register findScratchNonCalleeSaveRegister(MachineBasicBlock *MBB) {
10461036
const AArch64Subtarget &Subtarget = MF->getSubtarget<AArch64Subtarget>();
10471037
const AArch64RegisterInfo &TRI = *Subtarget.getRegisterInfo();
10481038
LiveRegUnits LiveRegs(TRI);
1039+
10491040
LiveRegs.addLiveIns(MBB);
10501041

10511042
// Prefer X9 since it was historically used for the prologue scratch reg.

0 commit comments

Comments
 (0)