[all-commits] [llvm/llvm-project] 5e158f: [Clang][AMDGPU] Add ``amdgpu_av("none")`` attribut...
Sameer Sahasrabuddhe via All-commits
all-commits at lists.llvm.org
Tue Aug 4 21:53:04 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5e158f2fdb4ae1caf76278d991b2a83deb541506
https://github.com/llvm/llvm-project/commit/5e158f2fdb4ae1caf76278d991b2a83deb541506
Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
Date: 2026-08-05 (Wed, 05 Aug 2026)
Changed paths:
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/AttrDocs.td
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/CodeGen/CGAtomic.cpp
M clang/lib/CodeGen/CGBuiltin.cpp
M clang/lib/CodeGen/CGStmt.cpp
M clang/lib/CodeGen/CodeGenFunction.h
M clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
M clang/lib/CodeGen/Targets/AMDGPU.cpp
M clang/lib/Sema/SemaStmtAttr.cpp
A clang/test/CodeGen/AMDGPU/amdgcn-av-non-atomic.cpp
A clang/test/CodeGen/AMDGPU/amdgcn-av-none-amdgpu-atomic.cpp
A clang/test/CodeGen/AMDGPU/amdgcn-av-none-attr-c-atomic.c
A clang/test/CodeGen/AMDGPU/amdgcn-av-none-attr.cpp
Log Message:
-----------
[Clang][AMDGPU] Add ``amdgpu_av("none")`` attribute for atomic expressions (#199622)
Add a statement attribute that suppresses MakeAvailable/MakeVisible
cache operations on AMDGPU atomic instructions while preserving memory
ordering (waits). The attribute takes a string argument specifying the
mode. Currently "none" is the only supported mode. The resulting atomic
or fence instruction carries !mmra !{!"amdgcn-av", !"none"} metadata.
This only works with builtins that get lowered to intrinsics or
instructions. The attribute does not survive inlining. For example, a
C++ std atomic is typically a wrapper around a Clang builtin, and
applying this attribute on the std atomic does not remove the
MakeAvailableMakeVisible semantics built into it.
Part of a stack:
- #199486
- #199621
- #199489
- #208395
- #199622
Fixes: LCOMPILER-2214
Assisted-By: Claude Opus 4.6
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list