[llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Wed Apr 25 15:13:51 PDT 2007
Changes in directory llvm/lib/Target/ARM:
ARMRegisterInfo.cpp updated: 1.87 -> 1.88
---
Log message:
Match MachineFunction::UsedPhysRegs changes.
---
Diffs of the changes: (+6 -9)
ARMRegisterInfo.cpp | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.87 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.88
--- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.87 Thu Apr 19 09:09:38 2007
+++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Wed Apr 25 17:13:27 2007
@@ -350,9 +350,6 @@
// Some targets reserve R9.
if (STI.isR9Reserved())
Reserved.set(ARM::R9);
- // At PEI time, if LR is used, it will be spilled upon entry.
- if (MF.getUsedPhysregs() && !MF.isPhysRegUsed((unsigned)ARM::LR))
- Reserved.set(ARM::LR);
return Reserved;
}
@@ -1094,7 +1091,7 @@
// If LR is not spilled, but at least one of R4, R5, R6, and R7 is spilled.
// Spill LR as well so we can fold BX_RET to the registers restore (LDM).
if (!LRSpilled && CS1Spilled) {
- MF.changePhyRegUsed(ARM::LR, true);
+ MF.setPhysRegUsed(ARM::LR);
AFI->setCSRegisterIsSpilled(ARM::LR);
NumGPRSpills++;
UnspilledCS1GPRs.erase(std::find(UnspilledCS1GPRs.begin(),
@@ -1106,7 +1103,7 @@
// Darwin ABI requires FP to point to the stack slot that contains the
// previous FP.
if (STI.isTargetDarwin() || hasFP(MF)) {
- MF.changePhyRegUsed(FramePtr, true);
+ MF.setPhysRegUsed(FramePtr);
NumGPRSpills++;
}
@@ -1117,13 +1114,13 @@
if (TargetAlign == 8 && (NumGPRSpills & 1)) {
if (CS1Spilled && !UnspilledCS1GPRs.empty()) {
unsigned Reg = UnspilledCS1GPRs.front();
- MF.changePhyRegUsed(Reg, true);
+ MF.setPhysRegUsed(Reg);
AFI->setCSRegisterIsSpilled(Reg);
if (!isReservedReg(MF, Reg))
ExtraCSSpill = true;
} else if (!UnspilledCS2GPRs.empty()) {
unsigned Reg = UnspilledCS2GPRs.front();
- MF.changePhyRegUsed(Reg, true);
+ MF.setPhysRegUsed(Reg);
AFI->setCSRegisterIsSpilled(Reg);
if (!isReservedReg(MF, Reg))
ExtraCSSpill = true;
@@ -1178,7 +1175,7 @@
}
if (Extras.size() && NumExtras == 0) {
for (unsigned i = 0, e = Extras.size(); i != e; ++i) {
- MF.changePhyRegUsed(Extras[i], true);
+ MF.setPhysRegUsed(Extras[i]);
AFI->setCSRegisterIsSpilled(Extras[i]);
}
} else {
@@ -1192,7 +1189,7 @@
}
if (ForceLRSpill) {
- MF.changePhyRegUsed(ARM::LR, true);
+ MF.setPhysRegUsed(ARM::LR);
AFI->setCSRegisterIsSpilled(ARM::LR);
AFI->setLRIsSpilledForFarJump(true);
}
More information about the llvm-commits
mailing list