[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:17:19 PDT 2022
Amir updated this revision to Diff 441198.
Amir added a comment.
dbgs -> outs
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.441198.patch
Type: text/x-patch
Size: 876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220629/e1298393/attachment.bin>
More information about the llvm-commits
mailing list