[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:28 PDT 2026
================
@@ -1215,7 +1280,7 @@ void InstrLowerer::lowerIncrement(InstrProfIncrementInst *Inc) {
Value *StepI64 =
Builder.CreateZExtOrTrunc(Inc->getStep(), Int64Ty, "step.i64");
Builder.CreateCall(Callee, {CastAddr, Uniform, StepI64});
- } else if (Options.Atomic || AtomicCounterUpdateAll ||
+ } else if ((!isCounterPromotionEnabled() && isAtomic()) ||
----------------
david-xl wrote:
Add a comment "Delay atomic operation creation until after promotion".
https://github.com/llvm/llvm-project/pull/202487
More information about the cfe-commits
mailing list