[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)
Amir Ayupov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 1 18:32:38 PDT 2024
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/90811
Map branches that are not present in BAT to the containing basic block.
The normal behavior is to map it to the preceding translation entry,
which may or may not be a basic block, and this causes profile staleness
issues.
This diff fulfills the intent of the comment added in 21f4303bfd01d:
```
// Branch source addresses are translated to the first instruction of the
// source BB to avoid accounting for modifications BOLT may have made in the
// BB regarding deletion/addition of instructions.
```
Test Plan: Updated bolt-address-translation-yaml.test
More information about the llvm-branch-commits
mailing list