[PATCH] R600: Don't viewCFG() under DEBUG() except on failure.

Matt Arsenault Matthew.Arsenault at amd.com
Mon Mar 24 13:19:34 PDT 2014


Having these popping up every time you use -debug is really irritating.

http://llvm-reviews.chandlerc.com/D3162

Files:
  lib/Target/R600/AMDILCFGStructurizer.cpp

Index: lib/Target/R600/AMDILCFGStructurizer.cpp
===================================================================
--- lib/Target/R600/AMDILCFGStructurizer.cpp
+++ lib/Target/R600/AMDILCFGStructurizer.cpp
@@ -790,7 +790,7 @@
 bool AMDGPUCFGStructurizer::run() {
 
   //Assume reducible CFG...
-  DEBUG(dbgs() << "AMDGPUCFGStructurizer::run\n";FuncRep->viewCFG(););
+  DEBUG(dbgs() << "AMDGPUCFGStructurizer::run\n");
 
 #ifdef STRESSTEST
   //Use the worse block ordering to test the algorithm.
@@ -862,8 +862,7 @@
           ContNextScc = false;
           DEBUG(
             dbgs() << "repeat processing SCC" << getSCCNum(MBB)
-                   << "sccNumIter = " << SccNumIter << "\n";
-            FuncRep->viewCFG();
+                   << "sccNumIter = " << SccNumIter << '\n';
           );
         } else {
           // Finish the current scc.
@@ -919,12 +918,10 @@
   BlockInfoMap.clear();
   LLInfoMap.clear();
 
-  DEBUG(
-    FuncRep->viewCFG();
-  );
-
-  if (!Finish)
-    llvm_unreachable("IRREDUCIBL_CF");
+  if (!Finish) {
+    DEBUG(FuncRep->viewCFG());
+    llvm_unreachable("IRREDUCIBLE_CFG");
+  }
 
   return true;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3162.1.patch
Type: text/x-patch
Size: 1146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140324/95bfb0dd/attachment.bin>


More information about the llvm-commits mailing list