Stop tracking unused registers in VirtRegMap.

The information was only used by the register allocator in
StackSlotColoring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-11-13 00:39:45 +00:00
parent 334575e79b
commit 929e4da68b
3 changed files with 3 additions and 82 deletions

View File

@ -49,11 +49,8 @@ namespace {
class StackSlotColoring : public MachineFunctionPass {
bool ColorWithRegs;
LiveStacks* LS;
VirtRegMap* VRM;
MachineFrameInfo *MFI;
MachineRegisterInfo *MRI;
const TargetInstrInfo *TII;
const TargetRegisterInfo *TRI;
const MachineLoopInfo *loopInfo;
// SSIntervals - Spill slot intervals.
@ -414,21 +411,16 @@ bool StackSlotColoring::runOnMachineFunction(MachineFunction &MF) {
});
MFI = MF.getFrameInfo();
MRI = &MF.getRegInfo();
TII = MF.getTarget().getInstrInfo();
TRI = MF.getTarget().getRegisterInfo();
LS = &getAnalysis<LiveStacks>();
VRM = &getAnalysis<VirtRegMap>();
loopInfo = &getAnalysis<MachineLoopInfo>();
bool Changed = false;
unsigned NumSlots = LS->getNumIntervals();
if (NumSlots < 2) {
if (NumSlots == 0 || !VRM->HasUnusedRegisters())
// Nothing to do!
return false;
}
if (NumSlots == 0)
// Nothing to do!
return false;
// If there are calls to setjmp or sigsetjmp, don't perform stack slot
// coloring. The stack could be modified before the longjmp is executed,