[PATCH] D106343: [OpenCL] Support cl_ext_float_atomics

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 23 01:53:08 PDT 2021


svenvh added inline comments.


================
Comment at: clang/lib/Sema/OpenCLBuiltins.td:1121
+    let Extension = FuncExtFloatAtomicsFp32GlobalAdd in {
+    def:
+      Builtin<"atomic_fetch_" #ModOp,
----------------
Please try to follow the formatting used in the rest of this file:
```
def : Builtin<...
```
So a space after `def`, then no newline after the `:`.

This applies to all the new `def`s below too.


================
Comment at: clang/lib/Sema/OpenCLBuiltins.td:1122
+    def:
+      Builtin<"atomic_fetch_" #ModOp,
+              [Float, PointerType<VolatileType<AtomicFloat>, GlobalAS>, Float]>;
----------------
The paste operator `#` is a binary operator, so it makes more sense to put a space on both sides.


================
Comment at: clang/lib/Sema/OpenCLBuiltins.td:1198
+    }
+    let Extension = FuncExtFloatAtomicsFp64GlobalAdd in {
+    def:
----------------
Wrong extension guard.


================
Comment at: clang/lib/Sema/OpenCLBuiltins.td:1294
+    }
+    let Extension = FuncExtFloatAtomicsFp64GlobalMinMax in {
+    def:
----------------
Wrong extension guard.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106343/new/

https://reviews.llvm.org/D106343



More information about the cfe-commits mailing list