@@ -1114,9 +1114,9 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
11141114 UnitAttr:$selfAttr,
11151115 Variadic<AnyType>:$reductionOperands,
11161116 OptionalAttr<SymbolRefArrayAttr>:$reductionRecipes,
1117- Variadic<OpenACC_PointerLikeTypeInterface>:$gangPrivateOperands ,
1117+ Variadic<OpenACC_PointerLikeTypeInterface>:$privateOperands ,
11181118 OptionalAttr<SymbolRefArrayAttr>:$privatizations,
1119- Variadic<OpenACC_PointerLikeTypeInterface>:$gangFirstPrivateOperands ,
1119+ Variadic<OpenACC_PointerLikeTypeInterface>:$firstprivateOperands ,
11201120 OptionalAttr<SymbolRefArrayAttr>:$firstprivatizations,
11211121 Variadic<OpenACC_PointerLikeTypeInterface>:$dataClauseOperands,
11221122 OptionalAttr<DefaultValueAttr>:$defaultAttr,
@@ -1134,8 +1134,8 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
11341134 CArg<"mlir::Value", "{}">:$ifCond,
11351135 CArg<"mlir::Value", "{}">:$selfCond,
11361136 CArg<"mlir::ValueRange", "{}">:$reductionOperands,
1137- CArg<"mlir::ValueRange", "{}">:$gangPrivateOperands ,
1138- CArg<"mlir::ValueRange", "{}">:$gangFirstPrivateOperands ,
1137+ CArg<"mlir::ValueRange", "{}">:$privateOperands ,
1138+ CArg<"mlir::ValueRange", "{}">:$firstprivateOperands ,
11391139 CArg<"mlir::ValueRange", "{}">:$dataClauseOperands)>];
11401140
11411141 let extraClassDeclaration = [{
@@ -1145,6 +1145,9 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
11451145 /// The i-th data operand passed.
11461146 Value getDataOperand(unsigned i);
11471147
1148+ /// Used to retrieve the block inside the op's region.
1149+ Block &getBody() { return getRegion().front(); }
1150+
11481151 /// Return true if the op has the async attribute for the
11491152 /// mlir::acc::DeviceType::None device_type.
11501153 bool hasAsyncOnly();
@@ -1202,15 +1205,15 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
12021205 `dataOperands` `(` $dataClauseOperands `:` type($dataClauseOperands) `)`
12031206 | `async` `(` custom<DeviceTypeOperands>($asyncOperands,
12041207 type($asyncOperands), $asyncOperandsDeviceType) `)`
1205- | `firstprivate` `(` custom<SymOperandList>($gangFirstPrivateOperands ,
1206- type($gangFirstPrivateOperands ), $firstprivatizations)
1208+ | `firstprivate` `(` custom<SymOperandList>($firstprivateOperands ,
1209+ type($firstprivateOperands ), $firstprivatizations)
12071210 `)`
12081211 | `num_gangs` `(` custom<NumGangs>($numGangs,
12091212 type($numGangs), $numGangsDeviceType, $numGangsSegments) `)`
12101213 | `num_workers` `(` custom<DeviceTypeOperands>($numWorkers,
12111214 type($numWorkers), $numWorkersDeviceType) `)`
12121215 | `private` `(` custom<SymOperandList>(
1213- $gangPrivateOperands , type($gangPrivateOperands ), $privatizations)
1216+ $privateOperands , type($privateOperands ), $privatizations)
12141217 `)`
12151218 | `vector_length` `(` custom<DeviceTypeOperands>($vectorLength,
12161219 type($vectorLength), $vectorLengthDeviceType) `)`
@@ -1271,9 +1274,9 @@ def OpenACC_SerialOp : OpenACC_Op<"serial",
12711274 UnitAttr:$selfAttr,
12721275 Variadic<AnyType>:$reductionOperands,
12731276 OptionalAttr<SymbolRefArrayAttr>:$reductionRecipes,
1274- Variadic<OpenACC_PointerLikeTypeInterface>:$gangPrivateOperands ,
1277+ Variadic<OpenACC_PointerLikeTypeInterface>:$privateOperands ,
12751278 OptionalAttr<SymbolRefArrayAttr>:$privatizations,
1276- Variadic<OpenACC_PointerLikeTypeInterface>:$gangFirstPrivateOperands ,
1279+ Variadic<OpenACC_PointerLikeTypeInterface>:$firstprivateOperands ,
12771280 OptionalAttr<SymbolRefArrayAttr>:$firstprivatizations,
12781281 Variadic<OpenACC_PointerLikeTypeInterface>:$dataClauseOperands,
12791282 OptionalAttr<DefaultValueAttr>:$defaultAttr,
@@ -1288,6 +1291,9 @@ def OpenACC_SerialOp : OpenACC_Op<"serial",
12881291 /// The i-th data operand passed.
12891292 Value getDataOperand(unsigned i);
12901293
1294+ /// Used to retrieve the block inside the op's region.
1295+ Block &getBody() { return getRegion().front(); }
1296+
12911297 /// Return true if the op has the async attribute for the
12921298 /// mlir::acc::DeviceType::None device_type.
12931299 bool hasAsyncOnly();
@@ -1326,11 +1332,11 @@ def OpenACC_SerialOp : OpenACC_Op<"serial",
13261332 `dataOperands` `(` $dataClauseOperands `:` type($dataClauseOperands) `)`
13271333 | `async` `(` custom<DeviceTypeOperands>($asyncOperands,
13281334 type($asyncOperands), $asyncOperandsDeviceType) `)`
1329- | `firstprivate` `(` custom<SymOperandList>($gangFirstPrivateOperands ,
1330- type($gangFirstPrivateOperands ), $firstprivatizations)
1335+ | `firstprivate` `(` custom<SymOperandList>($firstprivateOperands ,
1336+ type($firstprivateOperands ), $firstprivatizations)
13311337 `)`
13321338 | `private` `(` custom<SymOperandList>(
1333- $gangPrivateOperands , type($gangPrivateOperands ), $privatizations)
1339+ $privateOperands , type($privateOperands ), $privatizations)
13341340 `)`
13351341 | `wait` `` custom<WaitClause>($waitOperands, type($waitOperands),
13361342 $waitOperandsDeviceType, $waitOperandsSegments, $hasWaitDevnum,
@@ -1410,6 +1416,9 @@ def OpenACC_KernelsOp : OpenACC_Op<"kernels",
14101416 /// The i-th data operand passed.
14111417 Value getDataOperand(unsigned i);
14121418
1419+ /// Used to retrieve the block inside the op's region.
1420+ Block &getBody() { return getRegion().front(); }
1421+
14131422 /// Return true if the op has the async attribute for the
14141423 /// mlir::acc::DeviceType::None device_type.
14151424 bool hasAsyncOnly();
@@ -1824,6 +1833,7 @@ def OpenACC_LoopOp : OpenACC_Op<"loop",
18241833 /// The i-th data operand passed.
18251834 Value getDataOperand(unsigned i);
18261835
1836+ /// Used to retrieve the block inside the op's region.
18271837 Block &getBody() { return getLoopRegions().front()->front(); }
18281838
18291839 /// Return true if the op has the auto attribute for the
0 commit comments