aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-04 18:08:26 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-04 18:08:26 +0000
commitfb69810a2b617d888b6ea7c6a69fee7364fe233b (patch)
treeb71d577c3d74c6d711c5ff6639bb4b1930b7fd2b
parent911a992c33287ef3f5972ae7a64fe56afd64bd98 (diff)
downloadexternal_llvm-fb69810a2b617d888b6ea7c6a69fee7364fe233b.zip
external_llvm-fb69810a2b617d888b6ea7c6a69fee7364fe233b.tar.gz
external_llvm-fb69810a2b617d888b6ea7c6a69fee7364fe233b.tar.bz2
Tweak debug output. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127006 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp7
-rw-r--r--lib/CodeGen/SplitKit.cpp9
2 files changed, 6 insertions, 10 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index eada8f9..14e376d 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -627,7 +627,12 @@ float RAGreedy::calcGlobalSplitCost(const BitVector &LiveBundles) {
if (Inserts)
GlobalCost += Inserts * SpillPlacer->getBlockFrequency(BC.Number);
}
- DEBUG(dbgs() << "Global cost = " << GlobalCost << '\n');
+ DEBUG({
+ dbgs() << "Global cost = " << GlobalCost << " with bundles";
+ for (int i = LiveBundles.find_first(); i>=0; i = LiveBundles.find_next(i))
+ dbgs() << " EB#" << i;
+ dbgs() << ".\n";
+ });
return GlobalCost;
}
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index f16d033..4adf8f7 100644
--- a/lib/CodeGen/SplitKit.cpp
+++ b/lib/CodeGen/SplitKit.cpp
@@ -314,8 +314,6 @@ void SplitEditor::extendRange(unsigned RegIdx, SlotIndex Idx) {
// and we may need to create even more phi-defs to preserve VNInfo SSA form.
// Perform a search for all predecessor blocks where we know the dominating
// VNInfo. Insert phi-def VNInfos along the path back to IdxMBB.
- DEBUG(dbgs() << "\n Reaching defs for BB#" << IdxMBB->getNumber()
- << " at " << Idx << " in " << *LI << '\n');
// Initialize the live-out cache the first time it is needed.
if (LiveOutSeen.empty()) {
@@ -413,7 +411,6 @@ VNInfo *SplitEditor::updateSSA(unsigned RegIdx,
unsigned Changes;
do {
Changes = 0;
- DEBUG(dbgs() << " Iterating over " << LiveIn.size() << " blocks.\n");
// Propagate live-out values down the dominator tree, inserting phi-defs
// when necessary. Since LiveIn was created by a BFS, going backwards makes
// it more likely for us to visit immediate dominators before their
@@ -454,8 +451,6 @@ VNInfo *SplitEditor::updateSSA(unsigned RegIdx,
SlotIndex Start = LIS.getMBBStartIdx(MBB);
VNInfo *VNI = LI->getNextValue(Start, 0, LIS.getVNInfoAllocator());
VNI->setIsPHIDef(true);
- DEBUG(dbgs() << " - BB#" << MBB->getNumber()
- << " phi-def #" << VNI->id << " at " << Start << '\n');
// We no longer need LI to be live-in.
LiveIn.erase(LiveIn.begin()+(i-1));
// Blocks in LiveIn are either IdxMBB, or have a value live-through.
@@ -487,13 +482,9 @@ VNInfo *SplitEditor::updateSSA(unsigned RegIdx,
if (LOP.second != Node && LOP.first != IDomValue.first) {
++Changes;
LOP = IDomValue;
- DEBUG(dbgs() << " - BB#" << MBB->getNumber()
- << " idom valno #" << IDomValue.first->id
- << " from BB#" << IDom->getBlock()->getNumber() << '\n');
}
}
}
- DEBUG(dbgs() << " - made " << Changes << " changes.\n");
} while (Changes);
assert(IdxVNI && "Didn't find value for Idx");