[fast-isel] Guard "exhastive" fast-isel output with -fast-isel-verbose2.
authorChad Rosier <mcrosier@apple.com>
Tue, 13 Dec 2011 00:05:11 +0000 (00:05 +0000)
committerChad Rosier <mcrosier@apple.com>
Tue, 13 Dec 2011 00:05:11 +0000 (00:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146453 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index f6263533f047475f3c0fedec6eec6a410769af8a..477ec807eddcec4803c84f347350a97d47d5f5ff 100644 (file)
@@ -63,6 +63,10 @@ STATISTIC(NumDAGBlocks, "Number of blocks selected using DAG");
 STATISTIC(NumDAGIselRetries,"Number of times dag isel has to try another path");
 
 #ifndef NDEBUG
+static cl::opt<bool>
+EnableFastISelVerbose2("fast-isel-verbose2", cl::Hidden,
+          cl::desc("Enable extra verbose messages in the \"fast\" "
+                   "instruction selector"));
   // Terminators
 STATISTIC(NumFastIselFailRet,"Fast isel fails on Ret");
 STATISTIC(NumFastIselFailBr,"Fast isel fails on Br");
@@ -1086,7 +1090,8 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
         }
 
 #ifndef NDEBUG
-        collectFailStats(Inst);
+        if (EnableFastISelVerbose2)
+          collectFailStats(Inst);
 #endif
 
         // Then handle certain instructions as single-LLVM-Instruction blocks.