[PATCH] D128699: [BOLT][NFC] Respect shouldPrint in dump-dot-all
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 23:35:34 PDT 2022
Amir created this revision.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Don't dump dot CFG graph for functions that should not be printed.
Repository:
rG LLVM Github Monorepo
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)
+ dbgs() << "BOLT-DEBUG: Dumping CFG to " << Filename << "\n";
dumpGraphToFile(Filename);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128699.440486.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220628/7d9ad1c5/attachment.bin>
More information about the llvm-commits
mailing list