[PATCH] D131592: [SampleProfile] Fix non-determinism in promoteMergeNotInlinedContextSamples()
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 11:14:14 PDT 2022
hoy added a comment.
In D131592#3713569 <https://reviews.llvm.org/D131592#3713569>, @aeubanks wrote:
> In D131592#3713568 <https://reviews.llvm.org/D131592#3713568>, @hoy wrote:
>
>> What kind of non-determinism are you seeing? Is the transformed IR not deterministic?
>>
>> The `promoteMergeNotInlinedContextSamples` function basically merges the profile of a non-inlined callee function that is nested in its caller's profile into the callee function's own top-level outlined profile. When there aren't multiple callsites to the same callee, the order shouldn't matter. When there are, the merge operation basically does accumulation, and I don't see how the merging order matters either.
>
> Some branch_weights are slightly different across multiple runs of `./build/rel/bin/opt -passes=sample-profile -S reduced.ll -sample-profile-file ~/tmp/default.cs.xfdo -pgo-kind pgo-sample-use-pipeline -use-profiled-call-graph=false`.
Can you share reduced.ll and default.cs.xfdo?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131592/new/
https://reviews.llvm.org/D131592
More information about the llvm-commits
mailing list