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

Wael Yehia via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 08:06:48 PDT 2026


================
@@ -117,6 +119,16 @@ cl::opt<bool> AtomicCounterUpdateAll(
     cl::desc("Make all profile counter updates atomic (for testing only)"),
     cl::init(false));
 
+cl::opt<bool> AtomicCounterPromote(
+    "atomic-counter-promote",
+    cl::desc("Atomize profile counter updates and promote where possible"),
----------------
w2yehia wrote:

I changed `atomic-counter-update-promoted` to use `relaxed`.
I also removed my option, and made it part of the -fprofile-update=atomic behavior (i.e. we try to promote atomics if promotion is ON)

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


More information about the llvm-commits mailing list