When fixing probability of unreachable edges in BranchProbabilityInfo::calcMetadataWeights() proportionally distribute remainder probability over the reachable edges. The old implementation distributes the remainder probability evenly. See examples in the fixed tests.
Details
Diff Detail
Event Timeline
llvm/lib/Analysis/BranchProbabilityInfo.cpp | ||
---|---|---|
410 | It would help to understand the code if you split this series of calculations: uint64_t Mul = static_cast<uint64_t>(...) |
llvm/lib/Analysis/BranchProbabilityInfo.cpp | ||
---|---|---|
385 | OK, though in general I'd encourage to update to the capitalized variable name style in newly added code. |
"equally" -> "proportionally"?