[PATCH] D78806: SplitIndirectBrCriticalEdges: Fix Branch Probability update
Hiroshi Yamauchi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 1 17:15:00 PDT 2020
yamauchi added a comment.
What happens in the newly added test seems that none of the successor probabilities are ever set (BranchProbabilityInfo::Probs is empty throughout). The thing is that BPI does not internally store the edge probabilities unless they are non-default, unevenly-split ones (1/NumOfSuccessors) and relies on the real-time state of the blocks/CFG for default cases, which is likely different from what the author of SplitIndirectBrCriticalEdges expected. In contrast, BFI stores the block frequencies at the time it was calculated, which stays there after the blocks/CFG are modified. When the block "bb1" gets split, the number of its successors goes from two (50% each) to one (100%). Then, this 100% probability incorrectly gets copied to each of the two successors of the new block.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78806/new/
https://reviews.llvm.org/D78806
More information about the llvm-commits
mailing list