@@ -612,11 +612,11 @@ bool Thumb1FrameLowering::needPopSpecialFixUp(const MachineFunction &MF) const {
612
612
613
613
static void findTemporariesForLR (const BitVector &GPRsNoLRSP,
614
614
const BitVector &PopFriendly,
615
- const LivePhysRegs &UsedRegs, unsigned &PopReg,
615
+ const LiveRegUnits &UsedRegs, unsigned &PopReg,
616
616
unsigned &TmpReg, MachineRegisterInfo &MRI) {
617
617
PopReg = TmpReg = 0 ;
618
618
for (auto Reg : GPRsNoLRSP.set_bits ()) {
619
- if (UsedRegs.available (MRI, Reg)) {
619
+ if (UsedRegs.available (Reg)) {
620
620
// Remember the first pop-friendly register and exit.
621
621
if (PopFriendly.test (Reg)) {
622
622
PopReg = Reg;
@@ -684,7 +684,7 @@ bool Thumb1FrameLowering::emitPopSpecialFixUp(MachineBasicBlock &MBB,
684
684
// Look for a temporary register to use.
685
685
// First, compute the liveness information.
686
686
const TargetRegisterInfo &TRI = *STI.getRegisterInfo ();
687
- LivePhysRegs UsedRegs (TRI);
687
+ LiveRegUnits UsedRegs (TRI);
688
688
UsedRegs.addLiveOuts (MBB);
689
689
// The semantic of pristines changed recently and now,
690
690
// the callee-saved registers that are touched in the function
@@ -710,11 +710,6 @@ bool Thumb1FrameLowering::emitPopSpecialFixUp(MachineBasicBlock &MBB,
710
710
unsigned TemporaryReg = 0 ;
711
711
BitVector PopFriendly =
712
712
TRI.getAllocatableSet (MF, TRI.getRegClass (ARM::tGPRRegClassID));
713
- // R7 may be used as a frame pointer, hence marked as not generally
714
- // allocatable, however there's no reason to not use it as a temporary for
715
- // restoring LR.
716
- if (STI.getFramePointerReg () == ARM::R7)
717
- PopFriendly.set (ARM::R7);
718
713
719
714
assert (PopFriendly.any () && " No allocatable pop-friendly register?!" );
720
715
// Rebuild the GPRs from the high registers because they are removed
0 commit comments