Move debugging code entirely within DEBUG(). Silences an unused variable
authorMatt Beaumont-Gay <matthewbg@google.com>
Tue, 14 Dec 2010 21:14:55 +0000 (21:14 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Tue, 14 Dec 2010 21:14:55 +0000 (21:14 +0000)
warning in the opt build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121791 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocGreedy.cpp

index 324340ad17b1afc2219c633d02b637563e4d766f..1c58bbe288144ad269394af19c6ba81b27120bb5 100644 (file)
@@ -269,14 +269,14 @@ unsigned RAGreedy::tryReassign(LiveInterval &VirtReg, AllocationOrder &Order) {
 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;
 }