From 38b3f312ca1d64c342fdbe9dc2dd6eb5e956f5e6 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sun, 13 Nov 2011 00:39:45 +0000 Subject: Stop tracking unused registers in VirtRegMap. The information was only used by the register allocator in StackSlotColoring. llvm-svn: 144482 --- llvm/lib/CodeGen/StackSlotColoring.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'llvm/lib/CodeGen/StackSlotColoring.cpp') diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp index fbca3376426..f8177a228ce 100644 --- a/llvm/lib/CodeGen/StackSlotColoring.cpp +++ b/llvm/lib/CodeGen/StackSlotColoring.cpp @@ -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(); - VRM = &getAnalysis(); loopInfo = &getAnalysis(); 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, -- cgit v1.2.3