[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h PPCRegisterInfo.cpp PPCRegisterInfo.h
Evan Cheng
evan.cheng at apple.com
Mon Feb 26 18:55:46 PST 2007
Changes in directory llvm/lib/Target/PowerPC:
PPCMachineFunctionInfo.h updated: 1.3 -> 1.4
PPCRegisterInfo.cpp updated: 1.112 -> 1.113
PPCRegisterInfo.h updated: 1.29 -> 1.30
---
Log message:
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
---
Diffs of the changes: (+2 -19)
PPCMachineFunctionInfo.h | 7 -------
PPCRegisterInfo.cpp | 13 ++-----------
PPCRegisterInfo.h | 1 -
3 files changed, 2 insertions(+), 19 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
diff -u llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.3 llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.4
--- llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.3 Fri Feb 23 14:34:16 2007
+++ llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h Mon Feb 26 20:55:29 2007
@@ -26,10 +26,6 @@
/// 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 @@
int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
-
- void setUsesLR(bool U) { UsesLR = U; }
- bool usesLR() { return UsesLR; }
};
Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.112 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.113
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.112 Sat Feb 24 23:34:32 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Mon Feb 26 20:55:29 2007
@@ -538,8 +538,8 @@
/// 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 @@
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();
Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.h
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.29 llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.30
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.29 Fri Feb 23 14:34:16 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.h Mon Feb 26 20:55:29 2007
@@ -82,7 +82,6 @@
/// frame size.
void determineFrameLayout(MachineFunction &MF) const;
- void processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const;
void emitPrologue(MachineFunction &MF) const;
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
More information about the llvm-commits
mailing list