[llvm] [BOLT] Allow pass-through blocks in YAMLProfileReader (PR #91828)
Amir Ayupov via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 16:20:48 PDT 2024
================
@@ -218,17 +218,29 @@ bool YAMLProfileReader::parseFunctionProfile(
continue;
}
- BinaryBasicBlock &SuccessorBB = *Order[YamlSI.Index];
- if (!BB.getSuccessor(SuccessorBB.getLabel())) {
- if (opts::Verbosity >= 1)
- errs() << "BOLT-WARNING: no successor for block " << BB.getName()
- << " that matches index " << YamlSI.Index << " or block "
- << SuccessorBB.getName() << '\n';
- ++MismatchedEdges;
- continue;
+ BinaryBasicBlock *ToBB = Order[YamlSI.Index];
+ if (!BB.getSuccessor(ToBB->getLabel())) {
+ // Allow for BOLT-removed passthrough blocks to align with DataReader
+ // behavior.
----------------
aaupov wrote:
Rephrased the comment.
https://github.com/llvm/llvm-project/pull/91828
More information about the llvm-commits
mailing list