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

David Li via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 18 09:40:27 PDT 2026


================
@@ -870,10 +909,29 @@ bool InstrLowerer::isSamplingEnabled() const {
 bool InstrLowerer::isCounterPromotionEnabled() const {
   if (DoCounterPromotion.getNumOccurrences() > 0)
     return DoCounterPromotion;
-
   return Options.DoCounterPromotion;
 }
 
+bool InstrLowerer::isAtomic() const {
+  return Options.Atomic || AtomicCounterUpdateAll;
+}
+
+static void doAtomicPromotionCheck(Function *F) {
----------------
david-xl wrote:

Just 'doAtomicCheck(..)'.

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


More information about the cfe-commits mailing list