[llvm] [PGO] Implement PGO counter promotion for atomic updates (PR #202487)

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 20:50:31 PDT 2026


david-xl wrote:

The patch can be improved to work with -fprofile-update=atomic when counter promotion is on (opt level > O0). What is needed is to not lower the counter increment to atomic too early if counter promotion is on. They can be made atomic later once the promotion is done.  A new option does not seem to be needed. The existing option atomic-counter-update-promoted can be kept as it is (it is not tied to -fprofile-update=atomic) except that the seq_cst can be relaxed.

https://github.com/llvm/llvm-project/pull/202487


More information about the llvm-commits mailing list