Changes in directory llvm/lib/Target/ARM:
ARMRegisterInfo.cpp updated: 1.68 -> 1.69 ARMRegisterInfo.h updated: 1.9 -> 1.10 --- Log message: Re-apply my liveintervalanalysis changes. Now with PR1207: http://llvm.org/PR1207 fixes. --- Diffs of the changes: (+17 -0) ARMRegisterInfo.cpp | 15 +++++++++++++++ ARMRegisterInfo.h | 2 ++ 2 files changed, 17 insertions(+) Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.68 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.69 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.68 Sun Feb 18 21:20:00 2007 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Mon Feb 19 15:49:53 2007 @@ -28,6 +28,7 @@ #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/ADT/BitVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/STLExtras.h" #include <algorithm> @@ -297,6 +298,20 @@ return CalleeSavedRegClasses; } +BitVector ARMRegisterInfo::getReservedRegs(const MachineFunction &MF) const { + BitVector Reserved(getNumRegs()); + Reserved.set(ARM::SP); + if (STI.isTargetDarwin() || hasFP(MF)) + Reserved.set(FramePtr); + // 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; +} + /// hasFP - Return true if the specified function should have a dedicated frame /// pointer register. This is true if the function has variable sized allocas /// or if frame pointer elimination is disabled. Index: llvm/lib/Target/ARM/ARMRegisterInfo.h diff -u llvm/lib/Target/ARM/ARMRegisterInfo.h:1.9 llvm/lib/Target/ARM/ARMRegisterInfo.h:1.10 --- llvm/lib/Target/ARM/ARMRegisterInfo.h:1.9 Sun Feb 18 21:20:00 2007 +++ llvm/lib/Target/ARM/ARMRegisterInfo.h Mon Feb 19 15:49:53 2007 @@ -67,6 +67,8 @@ const TargetRegisterClass* const* getCalleeSavedRegClasses() const; + BitVector getReservedRegs(const MachineFunction &MF) const; + bool hasFP(const MachineFunction &MF) const; void eliminateCallFramePseudoInstr(MachineFunction &MF, _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits