mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 00:36:36 +00:00
Backing out Jim's LR spill changes. This was causing llvm-gcc bootstrapping
to infinite loop: PPCMachineFunctionInfo.h updated: 1.2 -> 1.3 PPCRegisterInfo.cpp updated: 1.110 -> 1.111 PPCRegisterInfo.h updated: 1.28 -> 1.29 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34652 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
79224c4407
commit
3d3d627513
@ -26,10 +26,6 @@ private:
|
|||||||
/// stored. Also used as an anchor for instructions that need to be altered
|
/// stored. Also used as an anchor for instructions that need to be altered
|
||||||
/// when using frame pointers (dyna_add, dyna_sub.)
|
/// when using frame pointers (dyna_add, dyna_sub.)
|
||||||
int FramePointerSaveIndex;
|
int FramePointerSaveIndex;
|
||||||
|
|
||||||
/// UsesLR - Indicates whether LR is used in the current function.
|
|
||||||
///
|
|
||||||
bool UsesLR;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PPCFunctionInfo(MachineFunction& MF)
|
PPCFunctionInfo(MachineFunction& MF)
|
||||||
@ -38,9 +34,6 @@ public:
|
|||||||
|
|
||||||
int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
|
int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
|
||||||
void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
|
void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
|
||||||
|
|
||||||
void setUsesLR(bool U) { UsesLR = U; }
|
|
||||||
bool usesLR() { return UsesLR; }
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -538,8 +538,8 @@ bool PPCRegisterInfo::hasFP(const MachineFunction &MF) const {
|
|||||||
/// usesLR - Returns if the link registers (LR) has been used in the function.
|
/// usesLR - Returns if the link registers (LR) has been used in the function.
|
||||||
///
|
///
|
||||||
bool PPCRegisterInfo::usesLR(MachineFunction &MF) const {
|
bool PPCRegisterInfo::usesLR(MachineFunction &MF) const {
|
||||||
PPCFunctionInfo *FI = MF.getInfo<PPCFunctionInfo>();
|
const bool *PhysRegsUsed = MF.getUsedPhysregs();
|
||||||
return FI->usesLR();
|
return PhysRegsUsed[getRARegister()];
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPCRegisterInfo::
|
void PPCRegisterInfo::
|
||||||
@ -874,15 +874,6 @@ void PPCRegisterInfo::determineFrameLayout(MachineFunction &MF) const {
|
|||||||
MFI->setStackSize(FrameSize);
|
MFI->setStackSize(FrameSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF)
|
|
||||||
const {
|
|
||||||
// Save and clear the LR state.
|
|
||||||
PPCFunctionInfo *FI = MF.getInfo<PPCFunctionInfo>();
|
|
||||||
unsigned LR = getRARegister();
|
|
||||||
FI->setUsesLR(MF.isPhysRegUsed(LR));
|
|
||||||
MF.changePhyRegUsed(LR, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
||||||
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
|
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
|
||||||
MachineBasicBlock::iterator MBBI = MBB.begin();
|
MachineBasicBlock::iterator MBBI = MBB.begin();
|
||||||
|
@ -82,7 +82,6 @@ public:
|
|||||||
/// frame size.
|
/// frame size.
|
||||||
void determineFrameLayout(MachineFunction &MF) const;
|
void determineFrameLayout(MachineFunction &MF) const;
|
||||||
|
|
||||||
void processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const;
|
|
||||||
void emitPrologue(MachineFunction &MF) const;
|
void emitPrologue(MachineFunction &MF) const;
|
||||||
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user