aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-27 02:55:29 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-27 02:55:29 +0000
commit3d3d6275134f3c6d35a97a028a8556fd2e62243a (patch)
treefe46a44b5dfef46065acb4e82090814ccae15df4 /lib/Target/PowerPC/PPCRegisterInfo.cpp
parent79224c44070dce53bdcfa4f4352ed1b6f67d9c3c (diff)
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
Diffstat (limited to 'lib/Target/PowerPC/PPCRegisterInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp
index b600c17f3a..a765f33489 100644
--- a/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp
@@ -538,8 +538,8 @@ bool PPCRegisterInfo::hasFP(const MachineFunction &MF) const {
/// usesLR - Returns if the link registers (LR) has been used in the function.
///
bool PPCRegisterInfo::usesLR(MachineFunction &MF) const {
- PPCFunctionInfo *FI = MF.getInfo<PPCFunctionInfo>();
- return FI->usesLR();
+ const bool *PhysRegsUsed = MF.getUsedPhysregs();
+ return PhysRegsUsed[getRARegister()];
}
void PPCRegisterInfo::
@@ -874,15 +874,6 @@ void PPCRegisterInfo::determineFrameLayout(MachineFunction &MF) const {
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 {
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
MachineBasicBlock::iterator MBBI = MBB.begin();