@@ -63,19 +63,19 @@ def OpenACC_ReductionOpAttr : StrEnumAttr<"ReductionOpAttr",
63
63
// Type used in operation below.
64
64
def IntOrIndex : AnyTypeOf<[AnyInteger, Index]>;
65
65
66
- //===----------------------------------------------------------------------===//
67
- // 2.5.1 parallel Construct
68
- //===----------------------------------------------------------------------===//
69
-
70
- // Parallel op default enumeration
66
+ // Parallel and data op default enumeration
71
67
def OpenACC_DefaultNone : StrEnumAttrCase<"none">;
72
68
def OpenACC_DefaultPresent : StrEnumAttrCase<"present">;
73
69
def OpenACC_DefaultAttr : StrEnumAttr<"DefaultAttr",
74
- "default attribute value for parallel op ",
70
+ "default attribute values ",
75
71
[OpenACC_DefaultNone, OpenACC_DefaultPresent]> {
76
72
let cppNamespace = "::mlir::acc";
77
73
}
78
74
75
+ //===----------------------------------------------------------------------===//
76
+ // 2.5.1 parallel Construct
77
+ //===----------------------------------------------------------------------===//
78
+
79
79
def OpenACC_ParallelOp : OpenACC_Op<"parallel",
80
80
[AttrSizedOperandSegments]> {
81
81
let summary = "parallel construct";
@@ -178,7 +178,8 @@ def OpenACC_DataOp : OpenACC_Op<"data",
178
178
}];
179
179
180
180
181
- let arguments = (ins Variadic<AnyType>:$copyOperands,
181
+ let arguments = (ins Optional<I1>:$ifCond,
182
+ Variadic<AnyType>:$copyOperands,
182
183
Variadic<AnyType>:$copyinOperands,
183
184
Variadic<AnyType>:$copyinReadonlyOperands,
184
185
Variadic<AnyType>:$copyoutOperands,
@@ -187,11 +188,14 @@ def OpenACC_DataOp : OpenACC_Op<"data",
187
188
Variadic<AnyType>:$createZeroOperands,
188
189
Variadic<AnyType>:$noCreateOperands,
189
190
Variadic<AnyType>:$presentOperands,
190
- Variadic<AnyType>:$attachOperands);
191
+ Variadic<AnyType>:$deviceptrOperands,
192
+ Variadic<AnyType>:$attachOperands,
193
+ OptionalAttr<OpenACC_DefaultAttr>:$defaultAttr);
191
194
192
195
let regions = (region AnyRegion:$region);
193
196
194
197
let assemblyFormat = [{
198
+ ( `if` `(` $ifCond^ `)` )?
195
199
( `copy` `(` $copyOperands^ `:` type($copyOperands) `)` )?
196
200
( `copyin` `(` $copyinOperands^ `:` type($copyinOperands) `)` )?
197
201
( `copyin_readonly` `(` $copyinReadonlyOperands^ `:`
@@ -204,6 +208,7 @@ def OpenACC_DataOp : OpenACC_Op<"data",
204
208
type($createZeroOperands) `)` )?
205
209
( `no_create` `(` $noCreateOperands^ `:` type($noCreateOperands) `)` )?
206
210
( `present` `(` $presentOperands^ `:` type($presentOperands) `)` )?
211
+ ( `deviceptr` `(` $deviceptrOperands^ `:` type($deviceptrOperands) `)` )?
207
212
( `attach` `(` $attachOperands^ `:` type($attachOperands) `)` )?
208
213
$region attr-dict-with-keyword
209
214
}];
0 commit comments