[llvm] [BOLT][NFC] Add sink block to flow CFG in profile inference (PR #95047)
Amir Ayupov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 15:45:59 PDT 2024
================
@@ -360,25 +371,37 @@ createFlowFunction(const BinaryFunction::BasicBlockOrderType &BlockOrder) {
// Add dummy edges to the extra sources. If there are multiple entry blocks,
// add an unlikely edge from 0 to the subsequent ones
assert(InDegree[0] == 0 && "dummy entry blocks shouldn't have predecessors");
- for (uint64_t I = 1; I < Func.Blocks.size(); I++) {
----------------
aaupov wrote:
Keep Func.Blocks.size() and add `-1` to skip SinkBlock. Add a comment about skipping it.
https://github.com/llvm/llvm-project/pull/95047
More information about the llvm-commits
mailing list