[llvm-commits] [llvm] r127006 - in /llvm/trunk/lib/CodeGen: RegAllocGreedy.cpp SplitKit.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Mar 4 10:08:26 PST 2011


Author: stoklund
Date: Fri Mar  4 12:08:26 2011
New Revision: 127006

URL: http://llvm.org/viewvc/llvm-project?rev=127006&view=rev
Log:
Tweak debug output. No functional changes.

Modified:
    llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
    llvm/trunk/lib/CodeGen/SplitKit.cpp

Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=127006&r1=127005&r2=127006&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Fri Mar  4 12:08:26 2011
@@ -627,7 +627,12 @@
     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;
 }
 

Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=127006&r1=127005&r2=127006&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.cpp Fri Mar  4 12:08:26 2011
@@ -314,8 +314,6 @@
   // 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 @@
   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 @@
         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 @@
         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");





More information about the llvm-commits mailing list