diff options
author | ShatianWang <38512325+ShatianWang@users.noreply.github.com> | 2024-08-21 00:35:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-21 00:35:07 -0400 |
commit | cbd302410e9f27013223a96edcd78dfb597979e1 (patch) | |
tree | 136eb9be8c867e5069010b5b5b0e1a6edb275073 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 35cec805bfa91fd9b83c29c45f3a5877e484bd85 (diff) | |
download | llvm-cbd302410e9f27013223a96edcd78dfb597979e1.zip llvm-cbd302410e9f27013223a96edcd78dfb597979e1.tar.gz llvm-cbd302410e9f27013223a96edcd78dfb597979e1.tar.bz2 |
[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.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions