diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-13 00:39:45 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-13 00:39:45 +0000 |
| commit | 929e4da68ba95f0616172d326b8547f888f5eb37 (patch) | |
| tree | 40afc416492b39d3a1fb24f62193751299899bba /lib/CodeGen/StackSlotColoring.cpp | |
| parent | 334575e79b93500547e73519f5a68c7d99d1efaf (diff) | |
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
Diffstat (limited to 'lib/CodeGen/StackSlotColoring.cpp')
| -rw-r--r-- | lib/CodeGen/StackSlotColoring.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/CodeGen/StackSlotColoring.cpp b/lib/CodeGen/StackSlotColoring.cpp index fbca337642..f8177a228c 100644 --- a/lib/CodeGen/StackSlotColoring.cpp +++ b/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<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, |
