@@ -1114,9 +1114,9 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
1114
1114
UnitAttr:$selfAttr,
1115
1115
Variadic<AnyType>:$reductionOperands,
1116
1116
OptionalAttr<SymbolRefArrayAttr>:$reductionRecipes,
1117
- Variadic<OpenACC_PointerLikeTypeInterface>:$gangPrivateOperands ,
1117
+ Variadic<OpenACC_PointerLikeTypeInterface>:$privateOperands ,
1118
1118
OptionalAttr<SymbolRefArrayAttr>:$privatizations,
1119
- Variadic<OpenACC_PointerLikeTypeInterface>:$gangFirstPrivateOperands ,
1119
+ Variadic<OpenACC_PointerLikeTypeInterface>:$firstprivateOperands ,
1120
1120
OptionalAttr<SymbolRefArrayAttr>:$firstprivatizations,
1121
1121
Variadic<OpenACC_PointerLikeTypeInterface>:$dataClauseOperands,
1122
1122
OptionalAttr<DefaultValueAttr>:$defaultAttr,
@@ -1134,8 +1134,8 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
1134
1134
CArg<"mlir::Value", "{}">:$ifCond,
1135
1135
CArg<"mlir::Value", "{}">:$selfCond,
1136
1136
CArg<"mlir::ValueRange", "{}">:$reductionOperands,
1137
- CArg<"mlir::ValueRange", "{}">:$gangPrivateOperands ,
1138
- CArg<"mlir::ValueRange", "{}">:$gangFirstPrivateOperands ,
1137
+ CArg<"mlir::ValueRange", "{}">:$privateOperands ,
1138
+ CArg<"mlir::ValueRange", "{}">:$firstprivateOperands ,
1139
1139
CArg<"mlir::ValueRange", "{}">:$dataClauseOperands)>];
1140
1140
1141
1141
let extraClassDeclaration = [{
@@ -1145,6 +1145,9 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
1145
1145
/// The i-th data operand passed.
1146
1146
Value getDataOperand(unsigned i);
1147
1147
1148
+ /// Used to retrieve the block inside the op's region.
1149
+ Block &getBody() { return getRegion().front(); }
1150
+
1148
1151
/// Return true if the op has the async attribute for the
1149
1152
/// mlir::acc::DeviceType::None device_type.
1150
1153
bool hasAsyncOnly();
@@ -1202,15 +1205,15 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
1202
1205
`dataOperands` `(` $dataClauseOperands `:` type($dataClauseOperands) `)`
1203
1206
| `async` `(` custom<DeviceTypeOperands>($asyncOperands,
1204
1207
type($asyncOperands), $asyncOperandsDeviceType) `)`
1205
- | `firstprivate` `(` custom<SymOperandList>($gangFirstPrivateOperands ,
1206
- type($gangFirstPrivateOperands ), $firstprivatizations)
1208
+ | `firstprivate` `(` custom<SymOperandList>($firstprivateOperands ,
1209
+ type($firstprivateOperands ), $firstprivatizations)
1207
1210
`)`
1208
1211
| `num_gangs` `(` custom<NumGangs>($numGangs,
1209
1212
type($numGangs), $numGangsDeviceType, $numGangsSegments) `)`
1210
1213
| `num_workers` `(` custom<DeviceTypeOperands>($numWorkers,
1211
1214
type($numWorkers), $numWorkersDeviceType) `)`
1212
1215
| `private` `(` custom<SymOperandList>(
1213
- $gangPrivateOperands , type($gangPrivateOperands ), $privatizations)
1216
+ $privateOperands , type($privateOperands ), $privatizations)
1214
1217
`)`
1215
1218
| `vector_length` `(` custom<DeviceTypeOperands>($vectorLength,
1216
1219
type($vectorLength), $vectorLengthDeviceType) `)`
@@ -1271,9 +1274,9 @@ def OpenACC_SerialOp : OpenACC_Op<"serial",
1271
1274
UnitAttr:$selfAttr,
1272
1275
Variadic<AnyType>:$reductionOperands,
1273
1276
OptionalAttr<SymbolRefArrayAttr>:$reductionRecipes,
1274
- Variadic<OpenACC_PointerLikeTypeInterface>:$gangPrivateOperands ,
1277
+ Variadic<OpenACC_PointerLikeTypeInterface>:$privateOperands ,
1275
1278
OptionalAttr<SymbolRefArrayAttr>:$privatizations,
1276
- Variadic<OpenACC_PointerLikeTypeInterface>:$gangFirstPrivateOperands ,
1279
+ Variadic<OpenACC_PointerLikeTypeInterface>:$firstprivateOperands ,
1277
1280
OptionalAttr<SymbolRefArrayAttr>:$firstprivatizations,
1278
1281
Variadic<OpenACC_PointerLikeTypeInterface>:$dataClauseOperands,
1279
1282
OptionalAttr<DefaultValueAttr>:$defaultAttr,
@@ -1288,6 +1291,9 @@ def OpenACC_SerialOp : OpenACC_Op<"serial",
1288
1291
/// The i-th data operand passed.
1289
1292
Value getDataOperand(unsigned i);
1290
1293
1294
+ /// Used to retrieve the block inside the op's region.
1295
+ Block &getBody() { return getRegion().front(); }
1296
+
1291
1297
/// Return true if the op has the async attribute for the
1292
1298
/// mlir::acc::DeviceType::None device_type.
1293
1299
bool hasAsyncOnly();
@@ -1326,11 +1332,11 @@ def OpenACC_SerialOp : OpenACC_Op<"serial",
1326
1332
`dataOperands` `(` $dataClauseOperands `:` type($dataClauseOperands) `)`
1327
1333
| `async` `(` custom<DeviceTypeOperands>($asyncOperands,
1328
1334
type($asyncOperands), $asyncOperandsDeviceType) `)`
1329
- | `firstprivate` `(` custom<SymOperandList>($gangFirstPrivateOperands ,
1330
- type($gangFirstPrivateOperands ), $firstprivatizations)
1335
+ | `firstprivate` `(` custom<SymOperandList>($firstprivateOperands ,
1336
+ type($firstprivateOperands ), $firstprivatizations)
1331
1337
`)`
1332
1338
| `private` `(` custom<SymOperandList>(
1333
- $gangPrivateOperands , type($gangPrivateOperands ), $privatizations)
1339
+ $privateOperands , type($privateOperands ), $privatizations)
1334
1340
`)`
1335
1341
| `wait` `` custom<WaitClause>($waitOperands, type($waitOperands),
1336
1342
$waitOperandsDeviceType, $waitOperandsSegments, $hasWaitDevnum,
@@ -1410,6 +1416,9 @@ def OpenACC_KernelsOp : OpenACC_Op<"kernels",
1410
1416
/// The i-th data operand passed.
1411
1417
Value getDataOperand(unsigned i);
1412
1418
1419
+ /// Used to retrieve the block inside the op's region.
1420
+ Block &getBody() { return getRegion().front(); }
1421
+
1413
1422
/// Return true if the op has the async attribute for the
1414
1423
/// mlir::acc::DeviceType::None device_type.
1415
1424
bool hasAsyncOnly();
@@ -1824,6 +1833,7 @@ def OpenACC_LoopOp : OpenACC_Op<"loop",
1824
1833
/// The i-th data operand passed.
1825
1834
Value getDataOperand(unsigned i);
1826
1835
1836
+ /// Used to retrieve the block inside the op's region.
1827
1837
Block &getBody() { return getLoopRegions().front()->front(); }
1828
1838
1829
1839
/// Return true if the op has the auto attribute for the
0 commit comments