llvm-project
53623aca - [AMDGPU] Preserve noclobber after acquire operations from a different addrspace (#231855)

Commit
13 hours ago
[AMDGPU] Preserve noclobber after acquire operations from a different addrspace (#231855) Follow-up to #219991 to address reviewer comments: AMDGPUAnnotateUniformValues should annotate uniform global loads as `!amdgpu.noclobber` if the memory they are reading is never clobbered (since kernel launch) before the load is executed. PR #219991 strengthened the logic to consider acquire operations before the load as clobbering (because they cause stores from other threads to be observed by the load without a data race). This PR weakens this criterion to ignore acquire operations that don't affect the global address space (because they don't affect what the load in question may or may not see). This addresses the performance-relevant case of s_barriers with LDS-only fences. The logic is still overly pessimistic for one-as load acquires, they could also be ignored when looking for clobbering operations. Disclaimer: Claude gave review comments and suggestions that I addressed during development. For ROCM-29879. Assisted-by: AI
Author
Parents
Loading