[BOLT][NFC] Remove unused PrintInstructions argument
PrintInstructions was unused in BinaryFunction::print() and dump(). Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D140440
This commit is contained in:
parent
c08fad8193
commit
be9d3edee8
|
@ -1614,11 +1614,10 @@ public:
|
|||
|
||||
/// 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.
|
||||
|
|
|
@ -392,7 +392,7 @@ bool BinaryFunction::isForwardCall(const MCSymbol *CalleeSymbol) const {
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ void BinaryFunction::dump(bool PrintInstructions) const {
|
|||
// 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<BinaryFunction &>(*this).print(dbgs(), "", PrintInstructions);
|
||||
const_cast<BinaryFunction &>(*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 @@ void BinaryFunction::print(raw_ostream &OS, std::string Annotation,
|
|||
|
||||
OS << "\n}\n";
|
||||
|
||||
if (opts::PrintDynoStatsOnly || !PrintInstructions || !BC.InstPrinter)
|
||||
if (opts::PrintDynoStatsOnly || !BC.InstPrinter)
|
||||
return;
|
||||
|
||||
// Offset of the instruction in function.
|
||||
|
|
|
@ -448,10 +448,10 @@ void estimateEdgeCounts(BinaryFunction &BF) {
|
|||
computeEdgeWeights<BinaryBasicBlock *>(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);
|
||||
|
|
|
@ -298,7 +298,7 @@ void BinaryFunctionPassManager::runPasses() {
|
|||
if (!Pass->shouldPrint(Function))
|
||||
continue;
|
||||
|
||||
Function.print(outs(), Message, true);
|
||||
Function.print(outs(), Message);
|
||||
|
||||
if (opts::DumpDotAll)
|
||||
Function.dumpGraphForPass(PassIdName);
|
||||
|
|
|
@ -334,7 +334,7 @@ void MachORewriteInstance::disassembleFunctions() {
|
|||
continue;
|
||||
Function.disassemble();
|
||||
if (opts::PrintDisasm)
|
||||
Function.print(outs(), "after disassembly", true);
|
||||
Function.print(outs(), "after disassembly");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,7 +357,7 @@ void MachORewriteInstance::postProcessFunctions() {
|
|||
continue;
|
||||
Function.postProcessCFG();
|
||||
if (opts::PrintCFG)
|
||||
Function.print(outs(), "after building cfg", true);
|
||||
Function.print(outs(), "after building cfg");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2933,7 +2933,7 @@ void RewriteInstance::disassembleFunctions() {
|
|||
}
|
||||
|
||||
if (opts::PrintAll || opts::PrintDisasm)
|
||||
Function.print(outs(), "after disassembly", true);
|
||||
Function.print(outs(), "after disassembly");
|
||||
}
|
||||
|
||||
BC->processInterproceduralReferences();
|
||||
|
@ -3000,7 +3000,7 @@ void RewriteInstance::buildFunctionsCFG() {
|
|||
|
||||
if (opts::PrintAll) {
|
||||
auto L = BC->scopeLock();
|
||||
BF.print(outs(), "while building cfg", true);
|
||||
BF.print(outs(), "while building cfg");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -3033,7 +3033,7 @@ void RewriteInstance::postProcessFunctions() {
|
|||
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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user