[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 13 05:53:06 PST 2025


Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/98756 at github.com>


================
@@ -4340,6 +4340,18 @@ whole system, the current device, an OpenCL workgroup, wavefront, or just a
 single thread. If these are used on a target that does not support atomic
 scopes, then they will behave exactly as the standard GNU atomic builtins.
 
+Constant evaluatable atomic builtins
+------------------------------------
+
+Clang supports constant evaluation of all ``__c11_atomic_*`` and GCC-compatible 
+``__atomic_*`` builtins. Behaviour of identical as if evaluating these builtins
+in a single-threaded environment. 
----------------
AaronBallman wrote:

```suggestion
``__atomic_*`` builtins. The behavior is identical to evaluating these builtins
in a single-threaded environment. 
```

https://github.com/llvm/llvm-project/pull/98756


More information about the cfe-commits mailing list