[BOLT] Avoid extra function dump on invalid BBs found by UCE (NFC) (#165111)

This commit is contained in:
YongKang Zhu
2025-10-25 11:24:21 -07:00
committed by GitHub
parent 5d0f1591f8
commit b35c93ffe3

View File

@@ -346,13 +346,16 @@ void EliminateUnreachableBlocks::runOnFunction(BinaryFunction &Function) {
uint64_t Bytes;
Function.markUnreachableBlocks();
LLVM_DEBUG({
bool HasInvalidBB = false;
for (BinaryBasicBlock &BB : Function) {
if (!BB.isValid()) {
HasInvalidBB = true;
dbgs() << "BOLT-INFO: UCE found unreachable block " << BB.getName()
<< " in function " << Function << "\n";
Function.dump();
}
}
if (HasInvalidBB)
Function.dump();
});
BinaryContext::IndependentCodeEmitter Emitter =
BC.createIndependentMCCodeEmitter();