diff --git a/bolt/include/bolt/Core/BinaryFunction.h b/bolt/include/bolt/Core/BinaryFunction.h --- a/bolt/include/bolt/Core/BinaryFunction.h +++ b/bolt/include/bolt/Core/BinaryFunction.h @@ -1614,11 +1614,10 @@ /// Dump function information to debug output. If \p PrintInstructions /// is true - include instruction disassembly. - void dump(bool PrintInstructions = true) const; + void dump() const; /// Print function information to the \p OS stream. - void print(raw_ostream &OS, std::string Annotation = "", - bool PrintInstructions = true); + void print(raw_ostream &OS, std::string Annotation = ""); /// Print all relocations between \p Offset and \p Offset + \p Size in /// this function. 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 @@ -392,7 +392,7 @@ } } -void BinaryFunction::dump(bool PrintInstructions) const { +void BinaryFunction::dump() const { // getDynoStats calls FunctionLayout::updateLayoutIndices and // BasicBlock::analyzeBranch. The former cannot be const, but should be // removed, the latter should be made const, but seems to require refactoring. @@ -402,11 +402,10 @@ // modified. Only BinaryBasicBlocks are actually modified (if it all) and we // have mutable pointers to those regardless whether this function is // const-qualified or not. - const_cast(*this).print(dbgs(), "", PrintInstructions); + const_cast(*this).print(dbgs(), ""); } -void BinaryFunction::print(raw_ostream &OS, std::string Annotation, - bool PrintInstructions) { +void BinaryFunction::print(raw_ostream &OS, std::string Annotation) { if (!opts::shouldPrint(*this)) return; @@ -485,7 +484,7 @@ OS << "\n}\n"; - if (opts::PrintDynoStatsOnly || !PrintInstructions || !BC.InstPrinter) + if (opts::PrintDynoStatsOnly || !BC.InstPrinter) return; // Offset of the instruction in function. diff --git a/bolt/lib/Passes/MCF.cpp b/bolt/lib/Passes/MCF.cpp --- a/bolt/lib/Passes/MCF.cpp +++ b/bolt/lib/Passes/MCF.cpp @@ -448,10 +448,10 @@ computeEdgeWeights(BF, SuccEdgeWeights); } if (opts::EqualizeBBCounts) { - LLVM_DEBUG(BF.print(dbgs(), "before equalize BB counts", true)); + LLVM_DEBUG(BF.print(dbgs(), "before equalize BB counts")); auto Info = DataflowInfoManager(BF, nullptr, nullptr); equalizeBBCounts(Info, BF); - LLVM_DEBUG(BF.print(dbgs(), "after equalize BB counts", true)); + LLVM_DEBUG(BF.print(dbgs(), "after equalize BB counts")); } if (opts::IterativeGuess) guessEdgeByIterativeApproach(BF); diff --git a/bolt/lib/Rewrite/BinaryPassManager.cpp b/bolt/lib/Rewrite/BinaryPassManager.cpp --- a/bolt/lib/Rewrite/BinaryPassManager.cpp +++ b/bolt/lib/Rewrite/BinaryPassManager.cpp @@ -298,7 +298,7 @@ if (!Pass->shouldPrint(Function)) continue; - Function.print(outs(), Message, true); + Function.print(outs(), Message); if (opts::DumpDotAll) Function.dumpGraphForPass(PassIdName); diff --git a/bolt/lib/Rewrite/MachORewriteInstance.cpp b/bolt/lib/Rewrite/MachORewriteInstance.cpp --- a/bolt/lib/Rewrite/MachORewriteInstance.cpp +++ b/bolt/lib/Rewrite/MachORewriteInstance.cpp @@ -334,7 +334,7 @@ continue; Function.disassemble(); if (opts::PrintDisasm) - Function.print(outs(), "after disassembly", true); + Function.print(outs(), "after disassembly"); } } @@ -357,7 +357,7 @@ continue; Function.postProcessCFG(); if (opts::PrintCFG) - Function.print(outs(), "after building cfg", true); + Function.print(outs(), "after building cfg"); } } diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -2933,7 +2933,7 @@ } if (opts::PrintAll || opts::PrintDisasm) - Function.print(outs(), "after disassembly", true); + Function.print(outs(), "after disassembly"); } BC->processInterproceduralReferences(); @@ -3000,7 +3000,7 @@ if (opts::PrintAll) { auto L = BC->scopeLock(); - BF.print(outs(), "while building cfg", true); + BF.print(outs(), "while building cfg"); } }; @@ -3033,7 +3033,7 @@ Function.postProcessCFG(); if (opts::PrintAll || opts::PrintCFG) - Function.print(outs(), "after building cfg", true); + Function.print(outs(), "after building cfg"); if (opts::DumpDotAll) Function.dumpGraphForPass("00_build-cfg");