summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StackSlotColoring.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-11-13 00:39:45 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-11-13 00:39:45 +0000
commit38b3f312ca1d64c342fdbe9dc2dd6eb5e956f5e6 (patch)
tree57f72eabe369cf129a00e7910dfd5313dbec9313 /llvm/lib/CodeGen/StackSlotColoring.cpp
parent6ddb767fb5e50630d9a66cbb8fb9912d1786e470 (diff)
downloadbcm5719-llvm-38b3f312ca1d64c342fdbe9dc2dd6eb5e956f5e6.tar.gz
bcm5719-llvm-38b3f312ca1d64c342fdbe9dc2dd6eb5e956f5e6.zip
Stop tracking unused registers in VirtRegMap.
The information was only used by the register allocator in StackSlotColoring. llvm-svn: 144482
Diffstat (limited to 'llvm/lib/CodeGen/StackSlotColoring.cpp')
-rw-r--r--llvm/lib/CodeGen/StackSlotColoring.cpp14
1 files changed, 3 insertions, 11 deletions
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<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,
OpenPOWER on IntegriCloud