[Evaluator] Add missing LLVM_DEBUG()
authorNikita Popov <npopov@redhat.com>
Thu, 30 Jun 2022 09:54:47 +0000 (11:54 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 30 Jun 2022 09:54:47 +0000 (11:54 +0200)
Missed these in 41f0b6a78143776d673565cfa830849e3b468b8e, resulting
in unconditional debug output.

llvm/lib/Transforms/Utils/Evaluator.cpp

index aecf746..7b8d855 100644 (file)
@@ -587,11 +587,11 @@ bool Evaluator::EvaluateBlock(BasicBlock::iterator CurInst, BasicBlock *&NextBB,
         Ops.push_back(getVal(Op));
       InstResult = ConstantFoldInstOperands(&*CurInst, Ops, DL, TLI);
       if (!InstResult) {
-        dbgs() << "Cannot fold instruction: " << *CurInst << "\n";
+        LLVM_DEBUG(dbgs() << "Cannot fold instruction: " << *CurInst << "\n");
         return false;
       }
-      dbgs() << "Folded instruction " << *CurInst << " to " << *InstResult
-             << "\n";
+      LLVM_DEBUG(dbgs() << "Folded instruction " << *CurInst << " to "
+                        << *InstResult << "\n");
     }
 
     if (!CurInst->use_empty()) {