[llvm-commits] [llvm] r79378 - /llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
Lang Hames
lhames at gmail.com
Tue Aug 18 16:34:50 PDT 2009
Author: lhames
Date: Tue Aug 18 18:34:50 2009
New Revision: 79378
URL: http://llvm.org/viewvc/llvm-project?rev=79378&view=rev
Log:
Changes DOUT references in the PBQP allocator to use DEBUG(errs() ...)
Modified:
llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=79378&r1=79377&r2=79378&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Tue Aug 18 18:34:50 2009
@@ -702,7 +702,8 @@
// 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 @@
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 @@
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 @@
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;
More information about the llvm-commits
mailing list