R600: Don't viewCFG() under DEBUG() except on failure.
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 24 Mar 2014 20:29:02 +0000 (20:29 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 24 Mar 2014 20:29:02 +0000 (20:29 +0000)
Having these popping up every time you use -debug is really
irritating.

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

lib/Target/R600/AMDILCFGStructurizer.cpp

index 3f6a95d2f773c2200e5157bcdc16731df9ae4c85..21ca560dba09b795d27fc29cfd977e23b29adf87 100644 (file)
@@ -790,7 +790,7 @@ bool AMDGPUCFGStructurizer::prepare() {
 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 @@ bool AMDGPUCFGStructurizer::run() {
           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 @@ bool AMDGPUCFGStructurizer::run() {
   BlockInfoMap.clear();
   LLInfoMap.clear();
 
-  DEBUG(
-    FuncRep->viewCFG();
-  );
-
-  if (!Finish)
-    llvm_unreachable("IRREDUCIBL_CF");
+  if (!Finish) {
+    DEBUG(FuncRep->viewCFG());
+    llvm_unreachable("IRREDUCIBLE_CFG");
+  }
 
   return true;
 }