MLIR  20.0.0git
OpenMPClauseOperands.h
Go to the documentation of this file.
1 //===-- OpenMPClauseOperands.h ----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the structures defining MLIR operands associated with each
10 // OpenMP clause, and structures grouping the appropriate operands for each
11 // construct.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef MLIR_DIALECT_OPENMP_OPENMPCLAUSEOPERANDS_H_
16 #define MLIR_DIALECT_OPENMP_OPENMPCLAUSEOPERANDS_H_
17 
19 #include "llvm/ADT/SmallVector.h"
20 
21 #include "mlir/Dialect/OpenMP/OpenMPOpsEnums.h.inc"
22 
23 #define GET_ATTRDEF_CLASSES
24 #include "mlir/Dialect/OpenMP/OpenMPOpsAttributes.h.inc"
25 
26 namespace mlir {
27 namespace omp {
28 
29 //===----------------------------------------------------------------------===//
30 // Mixin structures defining MLIR operands associated with each OpenMP clause.
31 //===----------------------------------------------------------------------===//
32 
36 };
37 
40 };
41 
43  ClauseCancellationConstructTypeAttr cancelDirective;
44 };
45 
49 };
50 
52  /// This field has a generic name because it's mirroring the `sym_name`
53  /// argument of the `OpenMP_CriticalNameClause` tablegen definition. That one
54  /// can't be renamed to anything more specific because the `sym_name` name is
55  /// a requirement of the `Symbol` MLIR trait associated with that clause.
56  StringAttr symName;
57 };
58 
62 };
63 
66 };
67 
69  // The default capture type.
70  DeclareTargetDeviceType deviceType = DeclareTargetDeviceType::any;
71 };
72 
76 };
77 
79  ClauseDependAttr doacrossDependType;
80  IntegerAttr doacrossNumLoops;
82 };
83 
86 };
87 
89  Value final;
90 };
91 
94 };
95 
98 };
99 
101  IntegerAttr hint;
102 };
103 
104 struct IfClauseOps {
106 };
107 
112 };
113 
116 };
117 
120 };
121 
124  UnitAttr loopInclusive;
125 };
126 
127 struct MapClauseOps {
129 };
130 
132  UnitAttr mergeable;
133 };
134 
136  UnitAttr nogroup;
137 };
138 
141 };
142 
144  UnitAttr nowait;
145 };
146 
149 };
150 
153 };
154 
157 };
158 
160  ClauseOrderKindAttr order;
161  OrderModifierAttr orderMod;
162 };
163 
165  IntegerAttr ordered;
166 };
167 
169  UnitAttr parLevelSimd;
170 };
171 
174 };
175 
177  // SSA values that correspond to "original" values being privatized.
178  // They refer to the SSA value outside the OpenMP region from which a clone is
179  // created inside the region.
181  // The list of symbols referring to delayed privatizer ops (i.e. `omp.private`
182  // ops).
184 };
185 
187  ClauseProcBindKindAttr procBindKind;
188 };
189 
194 };
195 
197  IntegerAttr safelen;
198 };
199 
201  ClauseScheduleKindAttr scheduleKind;
203  ScheduleModifierAttr scheduleMod;
204  UnitAttr scheduleSimd;
205 };
206 
208  IntegerAttr simdlen;
209 };
210 
215 };
216 
219 };
220 
222  UnitAttr untied;
223 };
224 
227 };
228 
231 };
232 
233 //===----------------------------------------------------------------------===//
234 // Structures defining clause operands associated with each OpenMP leaf
235 // construct.
236 //
237 // These mirror the arguments expected by the corresponding OpenMP MLIR ops.
238 //===----------------------------------------------------------------------===//
239 
240 namespace detail {
241 template <typename... Mixins>
242 struct Clauses : public Mixins... {};
243 } // namespace detail
244 
247 
249 
252 
253 // TODO `indirect` clause.
255 
259 
261 
263 
265 
267 
271 
274 
279 
282 
283 // TODO `defaultmap`, `uses_allocators` clauses.
289 
293 
297 
298 // TODO `affinity`, `detach` clauses.
303 
306 
312 
314 
318 
323 
324 } // namespace omp
325 } // namespace mlir
326 
327 #endif // MLIR_DIALECT_OPENMP_OPENMPCLAUSEOPERANDS_H_
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition: Value.h:96
Include the generated interface declarations.
llvm::SmallVector< Attribute > alignments
llvm::SmallVector< Value > alignedVars
llvm::SmallVector< Value > allocateVars
llvm::SmallVector< Value > allocatorVars
ClauseCancellationConstructTypeAttr cancelDirective
llvm::SmallVector< Attribute > copyprivateSyms
llvm::SmallVector< Value > copyprivateVars
StringAttr symName
This field has a generic name because it's mirroring the sym_name argument of the OpenMP_CriticalName...
llvm::SmallVector< Value > dependVars
llvm::SmallVector< Attribute > dependKinds
DeclareTargetDeviceType deviceType
llvm::SmallVector< Value > doacrossDependVars
llvm::SmallVector< Value > hasDeviceAddrVars
llvm::SmallVector< Attribute > inReductionSyms
llvm::SmallVector< bool > inReductionByref
llvm::SmallVector< Value > inReductionVars
llvm::SmallVector< Value > isDevicePtrVars
llvm::SmallVector< Value > linearStepVars
llvm::SmallVector< Value > linearVars
llvm::SmallVector< Value > loopUpperBounds
llvm::SmallVector< Value > loopLowerBounds
llvm::SmallVector< Value > loopSteps
llvm::SmallVector< Value > mapVars
llvm::SmallVector< Value > nontemporalVars
llvm::SmallVector< Attribute > privateSyms
llvm::SmallVector< Value > privateVars
ClauseProcBindKindAttr procBindKind
llvm::SmallVector< Value > reductionVars
llvm::SmallVector< bool > reductionByref
llvm::SmallVector< Attribute > reductionSyms
ClauseScheduleKindAttr scheduleKind
llvm::SmallVector< Attribute > taskReductionSyms
llvm::SmallVector< bool > taskReductionByref
llvm::SmallVector< Value > taskReductionVars
llvm::SmallVector< Value > useDeviceAddrVars
llvm::SmallVector< Value > useDevicePtrVars