Skip to content

Commit 85939e5

Browse files
committed
[mlir][openacc][NFC] Rename custom parser from WaitOperands to DeviceTypeOperandsWithSegment
1 parent c041fa1 commit 85939e5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
976976
`)`
977977
| `vector_length` `(` custom<DeviceTypeOperands>($vectorLength,
978978
type($vectorLength), $vectorLengthDeviceType) `)`
979-
| `wait` `(` custom<WaitOperands>($waitOperands,
979+
| `wait` `(` custom<DeviceTypeOperandsWithSegment>($waitOperands,
980980
type($waitOperands), $waitOperandsDeviceType, $waitOperandsSegments) `)`
981981
| `self` `(` $selfCond `)`
982982
| `if` `(` $ifCond `)`
@@ -1075,7 +1075,7 @@ def OpenACC_SerialOp : OpenACC_Op<"serial",
10751075
| `private` `(` custom<SymOperandList>(
10761076
$gangPrivateOperands, type($gangPrivateOperands), $privatizations)
10771077
`)`
1078-
| `wait` `(` custom<WaitOperands>($waitOperands,
1078+
| `wait` `(` custom<DeviceTypeOperandsWithSegment>($waitOperands,
10791079
type($waitOperands), $waitOperandsDeviceType, $waitOperandsSegments) `)`
10801080
| `self` `(` $selfCond `)`
10811081
| `if` `(` $ifCond `)`
@@ -1196,8 +1196,9 @@ def OpenACC_KernelsOp : OpenACC_Op<"kernels",
11961196
type($numWorkers), $numWorkersDeviceType) `)`
11971197
| `vector_length` `(` custom<DeviceTypeOperands>($vectorLength,
11981198
type($vectorLength), $vectorLengthDeviceType) `)`
1199-
| `wait` `(` custom<WaitOperands>($waitOperands,
1200-
type($waitOperands), $waitOperandsDeviceType, $waitOperandsSegments) `)`
1199+
| `wait` `(` custom<DeviceTypeOperandsWithSegment>($waitOperands,
1200+
type($waitOperands), $waitOperandsDeviceType,
1201+
$waitOperandsSegments) `)`
12011202
| `self` `(` $selfCond `)`
12021203
| `if` `(` $ifCond `)`
12031204
)

mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ static void printNumGangs(mlir::OpAsmPrinter &p, mlir::Operation *op,
874874
}
875875
}
876876

877-
static ParseResult parseWaitOperands(
877+
static ParseResult parseDeviceTypeOperandsWithSegment(
878878
mlir::OpAsmParser &parser,
879879
llvm::SmallVectorImpl<mlir::OpAsmParser::UnresolvedOperand> &operands,
880880
llvm::SmallVectorImpl<Type> &types, mlir::ArrayAttr &deviceTypes,
@@ -918,11 +918,10 @@ static ParseResult parseWaitOperands(
918918
return success();
919919
}
920920

921-
static void printWaitOperands(mlir::OpAsmPrinter &p, mlir::Operation *op,
922-
mlir::OperandRange operands,
923-
mlir::TypeRange types,
924-
std::optional<mlir::ArrayAttr> deviceTypes,
925-
std::optional<mlir::DenseI32ArrayAttr> segments) {
921+
static void printDeviceTypeOperandsWithSegment(
922+
mlir::OpAsmPrinter &p, mlir::Operation *op, mlir::OperandRange operands,
923+
mlir::TypeRange types, std::optional<mlir::ArrayAttr> deviceTypes,
924+
std::optional<mlir::DenseI32ArrayAttr> segments) {
926925
unsigned opIdx = 0;
927926
for (unsigned i = 0; i < deviceTypes->size(); ++i) {
928927
if (i != 0)

0 commit comments

Comments
 (0)