summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit5d7ce57c13ba3f36d4b081214b12e837acad2e4b (patch)
tree604306c8cdb985ce783d811200fd80613b7a2bf2 /llvm
parent8cd69de23e6ae673739910cb7fd7425cd47d7261 (diff)
downloadbcm5719-llvm-5d7ce57c13ba3f36d4b081214b12e837acad2e4b.tar.gz
bcm5719-llvm-5d7ce57c13ba3f36d4b081214b12e837acad2e4b.zip
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 llvm-svn: 34652
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h7
-rw-r--r--llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp13
-rw-r--r--llvm/lib/Target/PowerPC/PPCRegisterInfo.h1
3 files changed, 2 insertions, 19 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
index e227456e635..b3e10176d23 100644
--- a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
+++ b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
@@ -26,10 +26,6 @@ private:
/// stored. Also used as an anchor for instructions that need to be altered
/// when using frame pointers (dyna_add, dyna_sub.)
int FramePointerSaveIndex;
-
- /// UsesLR - Indicates whether LR is used in the current function.
- ///
- bool UsesLR;
public:
PPCFunctionInfo(MachineFunction& MF)
@@ -38,9 +34,6 @@ public:
int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
-
- void setUsesLR(bool U) { UsesLR = U; }
- bool usesLR() { return UsesLR; }
};
diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
index b600c17f3ae..a765f33489f 100644
--- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/llvm/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();
diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.h b/llvm/lib/Target/PowerPC/PPCRegisterInfo.h
index 5ca2d7d2a29..eedb62770e8 100644
--- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.h
+++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.h
@@ -82,7 +82,6 @@ public:
/// frame size.
void determineFrameLayout(MachineFunction &MF) const;
- void processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const;
void emitPrologue(MachineFunction &MF) const;
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
OpenPOWER on IntegriCloud