@@ -2149,4 +2149,45 @@ def DeclareReductionOp : OpenMP_Op<"declare_reduction", [Symbol,
2149
2149
let hasRegionVerifier = 1;
2150
2150
}
2151
2151
2152
+ //===----------------------------------------------------------------------===//
2153
+ // 2.19.5.4 reduction clause
2154
+ //===----------------------------------------------------------------------===//
2155
+
2156
+ def ReductionOp : OpenMP_Op<"reduction"> {
2157
+ let summary = "reduction construct";
2158
+ let description = [{
2159
+ Indicates the value that is produced by the current reduction-participating
2160
+ entity for a reduction requested in some ancestor. The reduction is
2161
+ identified by the accumulator, but the value of the accumulator may not be
2162
+ updated immediately.
2163
+ }];
2164
+
2165
+ let arguments= (ins AnyType:$operand, OpenMP_PointerLikeType:$accumulator);
2166
+ let assemblyFormat = [{
2167
+ $operand `,` $accumulator attr-dict `:` type($operand) `,` type($accumulator)
2168
+ }];
2169
+ let hasVerifier = 1;
2170
+ }
2171
+
2172
+ //===----------------------------------------------------------------------===//
2173
+ // [Spec 5.2] 10.5 masked Construct
2174
+ //===----------------------------------------------------------------------===//
2175
+ def MaskedOp : OpenMP_Op<"masked"> {
2176
+ let summary = "masked construct";
2177
+ let description = [{
2178
+ Masked construct allows to specify a structured block to be executed by a subset of
2179
+ threads of the current team. Filter clause allows to select the threads expected to
2180
+ execute the region
2181
+ }];
2182
+
2183
+ let arguments = (ins Optional<I32>:$filteredThreadId);
2184
+ let regions = (region AnyRegion:$region);
2185
+
2186
+ let assemblyFormat = [{
2187
+ oilist(
2188
+ `filter` `(` $filteredThreadId `:` type($filteredThreadId) `)`
2189
+ ) $region attr-dict
2190
+ }];
2191
+ }
2192
+
2152
2193
#endif // OPENMP_OPS
0 commit comments