diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp --- a/bolt/lib/Core/BinaryFunction.cpp +++ b/bolt/lib/Core/BinaryFunction.cpp @@ -3110,8 +3110,12 @@ } void BinaryFunction::dumpGraphForPass(std::string Annotation) const { + if (!opts::shouldPrint(*this)) + return; + std::string Filename = constructFilename(getPrintName(), Annotation, ".dot"); - outs() << "BOLT-DEBUG: Dumping CFG to " << Filename << "\n"; + if (opts::Verbosity >= 1) + dbgs() << "BOLT-DEBUG: Dumping CFG to " << Filename << "\n"; dumpGraphToFile(Filename); }