[llvm] Change how branch weight is annotated for direct call (PR #90315)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 22:00:07 PDT 2024
wlei-llvm wrote:
> if the profile is a product of merging/downsampling multiple profiles.
is this due to stale profile? I can think of a scenario that two profiles are from different versions.
in one version:
```
main:100:50
1: 50 DirectCallee: 50
2: 50
```
say another version add one line at the beginning of main. Then
```
main:100:50
1: 50
2: 50 DirectCallee: 50
3: 50
```
merging them will get:
```
main:200:100
1: 100 DirectCallee: 50
2: 100 DirectCallee: 50
3: 50
```
Though either way may not be perfect in this case.
https://github.com/llvm/llvm-project/pull/90315
More information about the llvm-commits
mailing list