[llvm] [AMDGPU] IGLP: Fix static variables (PR #137549)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 1 04:14:59 PDT 2025
================
@@ -229,13 +229,13 @@ class SchedGroup {
SchedGroup(SchedGroupMask SGMask, std::optional<unsigned> MaxSize,
ScheduleDAGInstrs *DAG, const SIInstrInfo *TII)
: SGMask(SGMask), MaxSize(MaxSize), DAG(DAG), TII(TII) {
- SGID = NumSchedGroups++;
+ SGID = __atomic_fetch_add(&NumSchedGroups, 1, __ATOMIC_SEQ_CST);
----------------
arsenm wrote:
Nothing should be atomic here
https://github.com/llvm/llvm-project/pull/137549
More information about the llvm-commits
mailing list