[PATCH] D128699: [BOLT][NFC] Respect shouldPrint in dump-dot-all

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 16:21:48 PDT 2022


Amir updated this revision to Diff 441200.
Amir added a comment.

Use lower-case message


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128699/new/

https://reviews.llvm.org/D128699

Files:
  bolt/lib/Core/BinaryFunction.cpp


Index: bolt/lib/Core/BinaryFunction.cpp
===================================================================
--- bolt/lib/Core/BinaryFunction.cpp
+++ 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)
+    outs() << "BOLT-INFO: dumping CFG to " << Filename << "\n";
   dumpGraphToFile(Filename);
 }
 
@@ -4373,6 +4377,9 @@
 }
 
 void BinaryFunction::printLoopInfo(raw_ostream &OS) const {
+  if (!opts::shouldPrint(*this))
+    return;
+
   OS << "Loop Info for Function \"" << *this << "\"";
   if (hasValidProfile())
     OS << " (count: " << getExecutionCount() << ")";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128699.441200.patch
Type: text/x-patch
Size: 876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220629/3fc2926d/attachment.bin>


More information about the llvm-commits mailing list