llvm-project
cbd30241 - [BOLT] Improve BinaryFunction::inferFallThroughCounts() (#105450)

Commit
1 year ago
[BOLT] Improve BinaryFunction::inferFallThroughCounts() (#105450) This PR improves how basic block execution count is updated when using the BOLT option `-infer-fall-throughs`. Previously, if a 0-count fall-through edge is assigned a positive inferred count N, then the successor block's execution count will be incremented by N. Since the successor's execution count is calculated using information besides inflow sum (such as outflow sum), it likely is already correct, and incrementing it by an additional N would be wrong. This PR improves how the successor's execution count is updated by using the max over its current count and N.
Author
Parents
Loading