[llvm-commits] [llvm] r121791 - /llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp

Matt Beaumont-Gay matthewbg at google.com
Tue Dec 14 13:14:56 PST 2010


Author: matthewbg
Date: Tue Dec 14 15:14:55 2010
New Revision: 121791

URL: http://llvm.org/viewvc/llvm-project?rev=121791&view=rev
Log:
Move debugging code entirely within DEBUG(). Silences an unused variable
warning in the opt build.

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

Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=121791&r1=121790&r2=121791&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Tue Dec 14 15:14:55 2010
@@ -269,14 +269,14 @@
 unsigned RAGreedy::trySplit(LiveInterval &VirtReg, AllocationOrder &Order,
                             SmallVectorImpl<LiveInterval*>&SplitVRegs) {
   NamedRegionTimer T("Splitter", TimerGroupName, TimePassesIsEnabled);
-  Order.rewind();
-  while (unsigned PhysReg = Order.next()) {
-    DEBUG({
-      query(VirtReg, PhysReg).print(dbgs(), TRI);
-      for (const unsigned *AI = TRI->getAliasSet(PhysReg); *AI; ++AI)
-        query(VirtReg, *AI).print(dbgs(), TRI);
-    });
-  }
+  DEBUG({
+    Order.rewind();
+    while (unsigned PhysReg = Order.next()) {
+        query(VirtReg, PhysReg).print(dbgs(), TRI);
+        for (const unsigned *AI = TRI->getAliasSet(PhysReg); *AI; ++AI)
+          query(VirtReg, *AI).print(dbgs(), TRI);
+    }
+  });
   return 0;
 }
 





More information about the llvm-commits mailing list