summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocGreedy.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-10 23:49:00 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-10 23:49:00 +0000
commit8de03d222f3b481536a17029fbd9097e9a5a05f6 (patch)
tree04e835d995cb928c4c1a6e14ba5fb92746f37f88 /llvm/lib/CodeGen/RegAllocGreedy.cpp
parentaecdd871da0fd598b96656914a61d024ca91cb1d (diff)
downloadbcm5719-llvm-8de03d222f3b481536a17029fbd9097e9a5a05f6.tar.gz
bcm5719-llvm-8de03d222f3b481536a17029fbd9097e9a5a05f6.zip
Move MRI into RegAllocBase. Clean up debug output a bit.
llvm-svn: 121599
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocGreedy.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index af2c55e7d89..01946c0db4a 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -45,9 +45,6 @@ namespace {
class RAGreedy : public MachineFunctionPass, public RegAllocBase {
// context
MachineFunction *MF;
- const TargetMachine *TM;
- MachineRegisterInfo *MRI;
-
BitVector ReservedRegs;
// analyses
@@ -230,11 +227,6 @@ unsigned RAGreedy::selectOrSplit(LiveInterval &VirtReg,
SmallVector<unsigned, 8> PhysRegSpillCands, ReassignCands;
// Check for an available register in this class.
- DEBUG({
- const TargetRegisterClass *TRC = MRI->getRegClass(VirtReg.reg);
- dbgs() << "RegClass: " << TRC->getName() << ' ';
- });
-
AllocationOrder Order(VirtReg.reg, *VRM, ReservedRegs);
while (unsigned PhysReg = Order.next()) {
// Check interference and as a side effect, intialize queries for this
@@ -305,12 +297,7 @@ bool RAGreedy::runOnMachineFunction(MachineFunction &mf) {
<< ((Value*)mf.getFunction())->getName() << '\n');
MF = &mf;
- TM = &mf.getTarget();
- MRI = &mf.getRegInfo();
-
- const TargetRegisterInfo *TRI = TM->getRegisterInfo();
- RegAllocBase::init(*TRI, getAnalysis<VirtRegMap>(),
- getAnalysis<LiveIntervals>());
+ RegAllocBase::init(getAnalysis<VirtRegMap>(), getAnalysis<LiveIntervals>());
ReservedRegs = TRI->getReservedRegs(*MF);
SpillerInstance.reset(createInlineSpiller(*this, *MF, *VRM));
OpenPOWER on IntegriCloud