summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocPBQP.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2009-08-18 23:34:50 +0000
committerLang Hames <lhames@gmail.com>2009-08-18 23:34:50 +0000
commit233fd9cea04468d71ae44031df3f2c8d1c3299a7 (patch)
treee8f054fc50191fc461851273e0213df37366ae52 /lib/CodeGen/RegAllocPBQP.cpp
parentb120ab4057fc66ce11ee1f108af9dbbeafa3fed9 (diff)
downloadllvm-233fd9cea04468d71ae44031df3f2c8d1c3299a7.tar.gz
llvm-233fd9cea04468d71ae44031df3f2c8d1c3299a7.tar.bz2
llvm-233fd9cea04468d71ae44031df3f2c8d1c3299a7.tar.xz
Changes DOUT references in the PBQP allocator to use DEBUG(errs() ...)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocPBQP.cpp')
-rw-r--r--lib/CodeGen/RegAllocPBQP.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp
index e8b8152b38..3da2553377 100644
--- a/lib/CodeGen/RegAllocPBQP.cpp
+++ b/lib/CodeGen/RegAllocPBQP.cpp
@@ -702,7 +702,8 @@ bool PBQPRegAlloc::mapPBQPToRegAlloc(const PBQP::Solution &solution) {
// Get the physical reg, subtracting 1 to account for the spill option.
unsigned physReg = allowedSets[node][allocSelection - 1];
- DOUT << "VREG " << virtReg << " -> " << tri->getName(physReg) << "\n";
+ DEBUG(errs() << "VREG " << virtReg << " -> "
+ << tri->getName(physReg) << "\n");
assert(physReg != 0);
@@ -724,8 +725,8 @@ bool PBQPRegAlloc::mapPBQPToRegAlloc(const PBQP::Solution &solution) {
lis->addIntervalsForSpills(*spillInterval, spillIs, loopInfo, *vrm);
addStackInterval(spillInterval, mri);
- DOUT << "VREG " << virtReg << " -> SPILLED (Cost: "
- << oldSpillWeight << ", New vregs: ";
+ DEBUG(errs() << "VREG " << virtReg << " -> SPILLED (Cost: "
+ << oldSpillWeight << ", New vregs: ");
// Copy any newly inserted live intervals into the list of regs to
// allocate.
@@ -735,12 +736,12 @@ bool PBQPRegAlloc::mapPBQPToRegAlloc(const PBQP::Solution &solution) {
assert(!(*itr)->empty() && "Empty spill range.");
- DOUT << (*itr)->reg << " ";
+ DEBUG(errs() << (*itr)->reg << " ");
vregIntervalsToAlloc.insert(*itr);
}
- DOUT << ")\n";
+ DEBUG(errs() << ")\n");
// We need another round if spill intervals were added.
anotherRoundNeeded |= !newSpills.empty();
@@ -863,12 +864,7 @@ bool PBQPRegAlloc::runOnMachineFunction(MachineFunction &MF) {
PBQP::HeuristicSolver<PBQP::Heuristics::Briggs> solver;
problem.assignNodeIDs();
PBQP::Solution solution = solver.solve(problem);
-/*
- std::cerr << "Solution:\n";
- for (unsigned i = 0; i < solution.numNodes(); ++i) {
- std::cerr << " " << i << " -> " << solution.getSelection(i) << "\n";
- }
-*/
+
pbqpAllocComplete = mapPBQPToRegAlloc(solution);
++round;