[all-commits] [llvm/llvm-project] 0584d0: [Clang][HIP] Deprecate __hip_atomic_* builtins (#1...
Sameer Sahasrabuddhe via All-commits
all-commits at lists.llvm.org
Tue Apr 7 21:11:40 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0584d0a6007173bb8d089c4e3e4163606dc681c4
https://github.com/llvm/llvm-project/commit/0584d0a6007173bb8d089c4e3e4163606dc681c4
Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
Date: 2026-04-08 (Wed, 08 Apr 2026)
Changed paths:
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaChecking.cpp
A clang/test/CodeGenHIP/atomic-deprecated-fixit.hip
A clang/test/SemaHIP/atomic-deprecated.hip
Log Message:
-----------
[Clang][HIP] Deprecate __hip_atomic_* builtins (#189897)
Emit deprecation warnings for all __hip_atomic_* builtins,
pointing users to their __scoped_atomic_* equivalents.
The warning is ignored by default, and can be enabled with
-Whip-deprecated-builtins. It will be turned on by default eventually
after we have cleaned up all ROCm/HIP headers and put a deprecation
schedule in place.
Also provide a fixit when the scope is a compile-time constant and there
is a direct mapping from the HIP builtin to a Clang builtin. The
compare_exchange builtins differ in how they accept the desired value,
so only a warning (without a fixit) is emitted for those.
This makes #185408 almost redundant for HIP, since the HIP scopes
themselves will disappear once the `__hip_*` builtins are gone. OpenCL
is different because the language itself specifies an enum. A simpler
version of #185408 can be used to emit a warning when Sema recognizes
that a non-OpenCL builtin is being passed an OpenCL scope.
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