diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td --- a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td +++ b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td @@ -117,38 +117,43 @@ let regions = (region AnyRegion:$region); let extraClassDeclaration = [{ - static StringRef getAsyncKeyword() { return "async"; } - static StringRef getAsyncAttrName() { return "asyncAttr"; } - static StringRef getWaitKeyword() { return "wait"; } - static StringRef getWaitAttrName() { return "waitAttr"; } - static StringRef getNumGangsKeyword() { return "num_gangs"; } - static StringRef getNumWorkersKeyword() { return "num_workers"; } - static StringRef getVectorLengthKeyword() { return "vector_length"; } - static StringRef getIfKeyword() { return "if"; } - static StringRef getSelfKeyword() { return "self"; } - static StringRef getSelfAttrName() { return "selfAttr"; } - static StringRef getReductionKeyword() { return "reduction"; } - static StringRef getCopyKeyword() { return "copy"; } - static StringRef getCopyinKeyword() { return "copyin"; } - static StringRef getCopyinReadonlyKeyword() { return "copyin_readonly"; } - static StringRef getCopyoutKeyword() { return "copyout"; } - static StringRef getCopyoutZeroKeyword() { return "copyout_zero"; } - static StringRef getCreateKeyword() { return "create"; } - static StringRef getCreateZeroKeyword() { return "create_zero"; } - static StringRef getNoCreateKeyword() { return "no_create"; } - static StringRef getPresentKeyword() { return "present"; } - static StringRef getDevicePtrKeyword() { return "deviceptr"; } - static StringRef getAttachKeyword() { return "attach"; } - static StringRef getPrivateKeyword() { return "private"; } - static StringRef getFirstPrivateKeyword() { return "firstprivate"; } - /// The number of data operands. unsigned getNumDataOperands(); /// The i-th data operand passed. Value getDataOperand(unsigned i); }]; - let hasCustomAssemblyFormat = 1; + + let assemblyFormat = [{ + oilist( + `attach` `(` $attachOperands `:` type($attachOperands) `)` + | `async` `(` $async `:` type($async) `)` + | `copy` `(` $copyOperands `:` type($copyOperands) `)` + | `copyin` `(` $copyinOperands `:` type($copyinOperands) `)` + | `copyin_readonly` `(` $copyinReadonlyOperands `:` + type($copyinReadonlyOperands) `)` + | `copyout` `(` $copyoutOperands `:` type($copyoutOperands) `)` + | `copyout_zero` `(` $copyoutZeroOperands `:` + type($copyoutZeroOperands) `)` + | `create` `(` $createOperands `:` type($createOperands) `)` + | `create_zero` `(` $createZeroOperands `:` + type($createZeroOperands) `)` + | `deviceptr` `(` $devicePtrOperands `:` type($devicePtrOperands) `)` + | `firstprivate` `(` $gangFirstPrivateOperands `:` + type($gangFirstPrivateOperands) `)` + | `no_create` `(` $noCreateOperands `:` type($noCreateOperands) `)` + | `num_gangs` `(` $numGangs `:` type($numGangs) `)` + | `num_workers` `(` $numWorkers `:` type($numWorkers) `)` + | `private` `(` $gangPrivateOperands `:` type($gangPrivateOperands) `)` + | `present` `(` $presentOperands `:` type($presentOperands) `)` + | `vector_length` `(` $vectorLength `:` type($vectorLength) `)` + | `wait` `(` $waitOperands `:` type($waitOperands) `)` + | `self` `(` $selfCond `)` + | `if` `(` $ifCond `)` + | `reduction` `(` $reductionOperands `:` type($reductionOperands) `)` + ) + $region attr-dict-with-keyword + }]; } //===----------------------------------------------------------------------===// diff --git a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp --- a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp +++ b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp @@ -97,21 +97,6 @@ } } -static ParseResult parseOptionalOperand(OpAsmParser &parser, StringRef keyword, - OpAsmParser::UnresolvedOperand &operand, - Type type, bool &hasOptional, - OperationState &result) { - hasOptional = false; - if (succeeded(parser.parseOptionalKeyword(keyword))) { - hasOptional = true; - if (parser.parseLParen() || parser.parseOperand(operand) || - parser.resolveOperand(operand, type, result.operands) || - parser.parseRParen()) - return failure(); - } - return success(); -} - static ParseResult parseOperandAndType(OpAsmParser &parser, OperationState &result) { OpAsmParser::UnresolvedOperand operand; @@ -122,21 +107,6 @@ return success(); } -/// Parse optional operand and its type wrapped in parenthesis prefixed with -/// a keyword. -/// Example: -/// keyword `(` %vectorLength: i64 `)` -static OptionalParseResult parseOptionalOperandAndType(OpAsmParser &parser, - StringRef keyword, - OperationState &result) { - OpAsmParser::UnresolvedOperand operand; - if (succeeded(parser.parseOptionalKeyword(keyword))) { - return failure(parser.parseLParen() || - parseOperandAndType(parser, result) || parser.parseRParen()); - } - return std::nullopt; -} - /// Parse optional operand and its type wrapped in parenthesis. /// Example: /// `(` %vectorLength: i64 `)` @@ -197,295 +167,6 @@ // ParallelOp //===----------------------------------------------------------------------===// -/// Parse acc.parallel operation -/// operation := `acc.parallel` `async` `(` index `)`? -/// `wait` `(` index-list `)`? -/// `num_gangs` `(` value `)`? -/// `num_workers` `(` value `)`? -/// `vector_length` `(` value `)`? -/// `if` `(` value `)`? -/// `self` `(` value `)`? -/// `reduction` `(` value-list `)`? -/// `copy` `(` value-list `)`? -/// `copyin` `(` value-list `)`? -/// `copyin_readonly` `(` value-list `)`? -/// `copyout` `(` value-list `)`? -/// `copyout_zero` `(` value-list `)`? -/// `create` `(` value-list `)`? -/// `create_zero` `(` value-list `)`? -/// `no_create` `(` value-list `)`? -/// `present` `(` value-list `)`? -/// `deviceptr` `(` value-list `)`? -/// `attach` `(` value-list `)`? -/// `private` `(` value-list `)`? -/// `firstprivate` `(` value-list `)`? -/// region attr-dict? -ParseResult ParallelOp::parse(OpAsmParser &parser, OperationState &result) { - Builder &builder = parser.getBuilder(); - SmallVector privateOperands, - firstprivateOperands, copyOperands, copyinOperands, - copyinReadonlyOperands, copyoutOperands, copyoutZeroOperands, - createOperands, createZeroOperands, noCreateOperands, presentOperands, - devicePtrOperands, attachOperands, waitOperands, reductionOperands; - SmallVector waitOperandTypes, reductionOperandTypes, - copyOperandTypes, copyinOperandTypes, copyinReadonlyOperandTypes, - copyoutOperandTypes, copyoutZeroOperandTypes, createOperandTypes, - createZeroOperandTypes, noCreateOperandTypes, presentOperandTypes, - deviceptrOperandTypes, attachOperandTypes, privateOperandTypes, - firstprivateOperandTypes; - - SmallVector operandTypes; - OpAsmParser::UnresolvedOperand ifCond, selfCond; - bool hasIfCond = false, hasSelfCond = false; - OptionalParseResult async, numGangs, numWorkers, vectorLength; - Type i1Type = builder.getI1Type(); - - // getAsync()? - async = parseOptionalOperandAndType(parser, ParallelOp::getAsyncKeyword(), - result); - if (async.has_value() && failed(*async)) - return failure(); - - // getWait()? - if (failed(parseOperandList(parser, ParallelOp::getWaitKeyword(), - waitOperands, waitOperandTypes, result))) - return failure(); - - // num_gangs(value)? - numGangs = parseOptionalOperandAndType( - parser, ParallelOp::getNumGangsKeyword(), result); - if (numGangs.has_value() && failed(*numGangs)) - return failure(); - - // num_workers(value)? - numWorkers = parseOptionalOperandAndType( - parser, ParallelOp::getNumWorkersKeyword(), result); - if (numWorkers.has_value() && failed(*numWorkers)) - return failure(); - - // vector_length(value)? - vectorLength = parseOptionalOperandAndType( - parser, ParallelOp::getVectorLengthKeyword(), result); - if (vectorLength.has_value() && failed(*vectorLength)) - return failure(); - - // if()? - if (failed(parseOptionalOperand(parser, ParallelOp::getIfKeyword(), ifCond, - i1Type, hasIfCond, result))) - return failure(); - - // self()? - if (failed(parseOptionalOperand(parser, ParallelOp::getSelfKeyword(), - selfCond, i1Type, hasSelfCond, result))) - return failure(); - - // reduction()? - if (failed(parseOperandList(parser, ParallelOp::getReductionKeyword(), - reductionOperands, reductionOperandTypes, - result))) - return failure(); - - // copy()? - if (failed(parseOperandList(parser, ParallelOp::getCopyKeyword(), - copyOperands, copyOperandTypes, result))) - return failure(); - - // copyin()? - if (failed(parseOperandList(parser, ParallelOp::getCopyinKeyword(), - copyinOperands, copyinOperandTypes, result))) - return failure(); - - // copyin_readonly()? - if (failed(parseOperandList(parser, ParallelOp::getCopyinReadonlyKeyword(), - copyinReadonlyOperands, - copyinReadonlyOperandTypes, result))) - return failure(); - - // copyout()? - if (failed(parseOperandList(parser, ParallelOp::getCopyoutKeyword(), - copyoutOperands, copyoutOperandTypes, result))) - return failure(); - - // copyout_zero()? - if (failed(parseOperandList(parser, ParallelOp::getCopyoutZeroKeyword(), - copyoutZeroOperands, copyoutZeroOperandTypes, - result))) - return failure(); - - // create()? - if (failed(parseOperandList(parser, ParallelOp::getCreateKeyword(), - createOperands, createOperandTypes, result))) - return failure(); - - // create_zero()? - if (failed(parseOperandList(parser, ParallelOp::getCreateZeroKeyword(), - createZeroOperands, createZeroOperandTypes, - result))) - return failure(); - - // no_create()? - if (failed(parseOperandList(parser, ParallelOp::getNoCreateKeyword(), - noCreateOperands, noCreateOperandTypes, result))) - return failure(); - - // present()? - if (failed(parseOperandList(parser, ParallelOp::getPresentKeyword(), - presentOperands, presentOperandTypes, result))) - return failure(); - - // deviceptr()? - if (failed(parseOperandList(parser, ParallelOp::getDevicePtrKeyword(), - devicePtrOperands, deviceptrOperandTypes, - result))) - return failure(); - - // attach()? - if (failed(parseOperandList(parser, ParallelOp::getAttachKeyword(), - attachOperands, attachOperandTypes, result))) - return failure(); - - // private()? - if (failed(parseOperandList(parser, ParallelOp::getPrivateKeyword(), - privateOperands, privateOperandTypes, result))) - return failure(); - - // firstprivate()? - if (failed(parseOperandList(parser, ParallelOp::getFirstPrivateKeyword(), - firstprivateOperands, firstprivateOperandTypes, - result))) - return failure(); - - // Parallel op region - if (failed(parseRegions(parser, result))) - return failure(); - - result.addAttribute( - ParallelOp::getOperandSegmentSizeAttr(), - builder.getDenseI32ArrayAttr( - {static_cast(async.has_value() ? 1 : 0), - static_cast(waitOperands.size()), - static_cast(numGangs.has_value() ? 1 : 0), - static_cast(numWorkers.has_value() ? 1 : 0), - static_cast(vectorLength.has_value() ? 1 : 0), - static_cast(hasIfCond ? 1 : 0), - static_cast(hasSelfCond ? 1 : 0), - static_cast(reductionOperands.size()), - static_cast(copyOperands.size()), - static_cast(copyinOperands.size()), - static_cast(copyinReadonlyOperands.size()), - static_cast(copyoutOperands.size()), - static_cast(copyoutZeroOperands.size()), - static_cast(createOperands.size()), - static_cast(createZeroOperands.size()), - static_cast(noCreateOperands.size()), - static_cast(presentOperands.size()), - static_cast(devicePtrOperands.size()), - static_cast(attachOperands.size()), - static_cast(privateOperands.size()), - static_cast(firstprivateOperands.size())})); - - // Additional attributes - if (failed(parser.parseOptionalAttrDictWithKeyword(result.attributes))) - return failure(); - - return success(); -} - -void ParallelOp::print(OpAsmPrinter &printer) { - // getAsync()? - if (Value async = getAsync()) - printer << " " << ParallelOp::getAsyncKeyword() << "(" << async << ": " - << async.getType() << ")"; - - // getWait()? - printOperandList(getWaitOperands(), ParallelOp::getWaitKeyword(), printer); - - // num_gangs()? - if (Value numGangs = getNumGangs()) - printer << " " << ParallelOp::getNumGangsKeyword() << "(" << numGangs - << ": " << numGangs.getType() << ")"; - - // num_workers()? - if (Value numWorkers = getNumWorkers()) - printer << " " << ParallelOp::getNumWorkersKeyword() << "(" << numWorkers - << ": " << numWorkers.getType() << ")"; - - // vector_length()? - if (Value vectorLength = getVectorLength()) - printer << " " << ParallelOp::getVectorLengthKeyword() << "(" - << vectorLength << ": " << vectorLength.getType() << ")"; - - // if()? - if (Value ifCond = getIfCond()) - printer << " " << ParallelOp::getIfKeyword() << "(" << ifCond << ")"; - - // self()? - if (Value selfCond = getSelfCond()) - printer << " " << ParallelOp::getSelfKeyword() << "(" << selfCond << ")"; - - // reduction()? - printOperandList(getReductionOperands(), ParallelOp::getReductionKeyword(), - printer); - - // copy()? - printOperandList(getCopyOperands(), ParallelOp::getCopyKeyword(), printer); - - // copyin()? - printOperandList(getCopyinOperands(), ParallelOp::getCopyinKeyword(), - printer); - - // copyin_readonly()? - printOperandList(getCopyinReadonlyOperands(), - ParallelOp::getCopyinReadonlyKeyword(), printer); - - // copyout()? - printOperandList(getCopyoutOperands(), ParallelOp::getCopyoutKeyword(), - printer); - - // copyout_zero()? - printOperandList(getCopyoutZeroOperands(), - ParallelOp::getCopyoutZeroKeyword(), printer); - - // create()? - printOperandList(getCreateOperands(), ParallelOp::getCreateKeyword(), - printer); - - // create_zero()? - printOperandList(getCreateZeroOperands(), ParallelOp::getCreateZeroKeyword(), - printer); - - // no_create()? - printOperandList(getNoCreateOperands(), ParallelOp::getNoCreateKeyword(), - printer); - - // present()? - printOperandList(getPresentOperands(), ParallelOp::getPresentKeyword(), - printer); - - // deviceptr()? - printOperandList(getDevicePtrOperands(), ParallelOp::getDevicePtrKeyword(), - printer); - - // attach()? - printOperandList(getAttachOperands(), ParallelOp::getAttachKeyword(), - printer); - - // private()? - printOperandList(getGangPrivateOperands(), ParallelOp::getPrivateKeyword(), - printer); - - // firstprivate()? - printOperandList(getGangFirstPrivateOperands(), - ParallelOp::getFirstPrivateKeyword(), printer); - - printer << ' '; - printer.printRegion(getRegion(), - /*printEntryBlockArgs=*/false, - /*printBlockTerminators=*/true); - printer.printOptionalAttrDictWithKeyword( - (*this)->getAttrs(), ParallelOp::getOperandSegmentSizeAttr()); -} - unsigned ParallelOp::getNumDataOperands() { return getReductionOperands().size() + getCopyOperands().size() + getCopyinOperands().size() + getCopyinReadonlyOperands().size() + diff --git a/mlir/test/Conversion/OpenACCToLLVM/convert-data-operands-to-llvmir.mlir b/mlir/test/Conversion/OpenACCToLLVM/convert-data-operands-to-llvmir.mlir --- a/mlir/test/Conversion/OpenACCToLLVM/convert-data-operands-to-llvmir.mlir +++ b/mlir/test/Conversion/OpenACCToLLVM/convert-data-operands-to-llvmir.mlir @@ -178,7 +178,7 @@ return } -// CHECK: acc.parallel copyin(%{{.*}}: !llvm.struct<"openacc_data", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) deviceptr(%{{.*}}: !llvm.ptr) attach(%{{.*}}: !llvm.ptr) +// CHECK: acc.parallel attach(%{{.*}}: !llvm.ptr) copyin(%{{.*}}: !llvm.struct<"openacc_data", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) deviceptr(%{{.*}} : !llvm.ptr) // ----- @@ -189,7 +189,7 @@ return } -// CHECK: acc.parallel if(%{{.*}}) copyin_readonly(%{{.*}}: !llvm.struct<"openacc_data", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) copyout_zero(%{{.*}}: !llvm.struct<"openacc_data.1", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) +// CHECK: acc.parallel copyin_readonly(%{{.*}}: !llvm.struct<"openacc_data", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) copyout_zero(%{{.*}}: !llvm.struct<"openacc_data.1", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) if(%{{.*}}) // ----- @@ -204,20 +204,20 @@ // ----- func.func @testparallelop(%a: memref<10xf32>, %b: memref<10xf32>) -> () { - acc.parallel present(%a: memref<10xf32>, %b: memref<10xf32>) { + acc.parallel present(%a, %b : memref<10xf32>, memref<10xf32>) { } return } -// CHECK: acc.parallel present(%{{.*}}: !llvm.struct<"openacc_data", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>, %{{.*}}: !llvm.struct<"openacc_data.1", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) +// CHECK: acc.parallel present(%{{.*}}, %{{.*}} : !llvm.struct<"openacc_data", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>, !llvm.struct<"openacc_data.1", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) // ----- func.func @testparallelop(%i: i64, %a: memref<10xf32>, %b: memref<10xf32>) -> () { - acc.parallel num_gangs(%i: i64) present(%a: memref<10xf32>, %b: memref<10xf32>) { + acc.parallel num_gangs(%i: i64) present(%a, %b : memref<10xf32>, memref<10xf32>) { } attributes {async} return } -// CHECK: acc.parallel num_gangs(%{{.*}}: i64) present(%{{.*}}: !llvm.struct<"openacc_data", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>, %{{.*}}: !llvm.struct<"openacc_data.1", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) +// CHECK: acc.parallel num_gangs(%{{.*}}: i64) present(%{{.*}}, %{{.*}} : !llvm.struct<"openacc_data", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>, !llvm.struct<"openacc_data.1", (struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)>, ptr, i64)>) // CHECK-NEXT: } attributes {async} diff --git a/mlir/test/Dialect/OpenACC/ops.mlir b/mlir/test/Dialect/OpenACC/ops.mlir --- a/mlir/test/Dialect/OpenACC/ops.mlir +++ b/mlir/test/Dialect/OpenACC/ops.mlir @@ -37,7 +37,7 @@ // CHECK-NEXT: %{{.*}} = arith.constant 10 : index // CHECK-NEXT: %{{.*}} = arith.constant 1 : index // CHECK-NEXT: [[ASYNC:%.*]] = arith.constant 1 : i64 -// CHECK-NEXT: acc.parallel async([[ASYNC]]: i64) { +// CHECK-NEXT: acc.parallel async([[ASYNC]] : i64) { // CHECK-NEXT: acc.loop gang vector { // CHECK-NEXT: scf.for %{{.*}} = %{{.*}} to %{{.*}} step %{{.*}} { // CHECK-NEXT: scf.for %{{.*}} = %{{.*}} to %{{.*}} step %{{.*}} { @@ -164,7 +164,7 @@ // CHECK-NEXT: [[NUMGANG:%.*]] = arith.constant 10 : i64 // CHECK-NEXT: [[NUMWORKERS:%.*]] = arith.constant 10 : i64 // CHECK-NEXT: acc.data present(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}} : memref<10x10xf32>, memref<10x10xf32>, memref<10xf32>, memref<10xf32>) { -// CHECK-NEXT: acc.parallel num_gangs([[NUMGANG]]: i64) num_workers([[NUMWORKERS]]: i64) private([[ARG2]]: memref<10xf32>) { +// CHECK-NEXT: acc.parallel num_gangs([[NUMGANG]] : i64) num_workers([[NUMWORKERS]] : i64) private([[ARG2]] : memref<10xf32>) { // CHECK-NEXT: acc.loop gang { // CHECK-NEXT: scf.for %{{.*}} = [[C0]] to [[C10]] step [[C1]] { // CHECK-NEXT: acc.loop worker { @@ -370,7 +370,7 @@ } acc.parallel wait(%idxValue: index) { } - acc.parallel wait(%i64value: i64, %i32value: i32, %idxValue: index) { + acc.parallel wait(%i64value, %i32value, %idxValue : i64, i32, index) { } acc.parallel num_gangs(%i64value: i64) { } @@ -390,21 +390,21 @@ } acc.parallel vector_length(%idxValue: index) { } - acc.parallel copyin(%a: memref<10xf32>, %b: memref<10xf32>) { + acc.parallel copyin(%a, %b : memref<10xf32>, memref<10xf32>) { } - acc.parallel copyin_readonly(%a: memref<10xf32>, %b: memref<10xf32>) { + acc.parallel copyin_readonly(%a, %b : memref<10xf32>, memref<10xf32>) { } - acc.parallel copyin(%a: memref<10xf32>) copyout_zero(%b: memref<10xf32>, %c: memref<10x10xf32>) { + acc.parallel copyin(%a: memref<10xf32>) copyout_zero(%b, %c : memref<10xf32>, memref<10x10xf32>) { } - acc.parallel copyout(%b: memref<10xf32>, %c: memref<10x10xf32>) create(%a: memref<10xf32>) { + acc.parallel copyout(%b, %c : memref<10xf32>, memref<10x10xf32>) create(%a: memref<10xf32>) { } - acc.parallel copyout_zero(%b: memref<10xf32>, %c: memref<10x10xf32>) create_zero(%a: memref<10xf32>) { + acc.parallel copyout_zero(%b, %c : memref<10xf32>, memref<10x10xf32>) create_zero(%a: memref<10xf32>) { } - acc.parallel no_create(%a: memref<10xf32>) present(%b: memref<10xf32>, %c: memref<10x10xf32>) { + acc.parallel no_create(%a: memref<10xf32>) present(%b, %c : memref<10xf32>, memref<10x10xf32>) { } - acc.parallel deviceptr(%a: memref<10xf32>) attach(%b: memref<10xf32>, %c: memref<10x10xf32>) { + acc.parallel deviceptr(%a: memref<10xf32>) attach(%b, %c : memref<10xf32>, memref<10x10xf32>) { } - acc.parallel private(%a: memref<10xf32>, %c: memref<10x10xf32>) firstprivate(%b: memref<10xf32>) { + acc.parallel private(%a, %c : memref<10xf32>, memref<10x10xf32>) firstprivate(%b: memref<10xf32>) { } acc.parallel { } attributes {defaultAttr = #acc} @@ -423,53 +423,53 @@ // CHECK: [[I64VALUE:%.*]] = arith.constant 1 : i64 // CHECK: [[I32VALUE:%.*]] = arith.constant 1 : i32 // CHECK: [[IDXVALUE:%.*]] = arith.constant 1 : index -// CHECK: acc.parallel async([[I64VALUE]]: i64) { +// CHECK: acc.parallel async([[I64VALUE]] : i64) { // CHECK-NEXT: } -// CHECK: acc.parallel async([[I32VALUE]]: i32) { +// CHECK: acc.parallel async([[I32VALUE]] : i32) { // CHECK-NEXT: } -// CHECK: acc.parallel async([[IDXVALUE]]: index) { +// CHECK: acc.parallel async([[IDXVALUE]] : index) { // CHECK-NEXT: } -// CHECK: acc.parallel wait([[I64VALUE]]: i64) { +// CHECK: acc.parallel wait([[I64VALUE]] : i64) { // CHECK-NEXT: } -// CHECK: acc.parallel wait([[I32VALUE]]: i32) { +// CHECK: acc.parallel wait([[I32VALUE]] : i32) { // CHECK-NEXT: } -// CHECK: acc.parallel wait([[IDXVALUE]]: index) { +// CHECK: acc.parallel wait([[IDXVALUE]] : index) { // CHECK-NEXT: } -// CHECK: acc.parallel wait([[I64VALUE]]: i64, [[I32VALUE]]: i32, [[IDXVALUE]]: index) { +// CHECK: acc.parallel wait([[I64VALUE]], [[I32VALUE]], [[IDXVALUE]] : i64, i32, index) { // CHECK-NEXT: } -// CHECK: acc.parallel num_gangs([[I64VALUE]]: i64) { +// CHECK: acc.parallel num_gangs([[I64VALUE]] : i64) { // CHECK-NEXT: } -// CHECK: acc.parallel num_gangs([[I32VALUE]]: i32) { +// CHECK: acc.parallel num_gangs([[I32VALUE]] : i32) { // CHECK-NEXT: } -// CHECK: acc.parallel num_gangs([[IDXVALUE]]: index) { +// CHECK: acc.parallel num_gangs([[IDXVALUE]] : index) { // CHECK-NEXT: } -// CHECK: acc.parallel num_workers([[I64VALUE]]: i64) { +// CHECK: acc.parallel num_workers([[I64VALUE]] : i64) { // CHECK-NEXT: } -// CHECK: acc.parallel num_workers([[I32VALUE]]: i32) { +// CHECK: acc.parallel num_workers([[I32VALUE]] : i32) { // CHECK-NEXT: } -// CHECK: acc.parallel num_workers([[IDXVALUE]]: index) { +// CHECK: acc.parallel num_workers([[IDXVALUE]] : index) { // CHECK-NEXT: } -// CHECK: acc.parallel vector_length([[I64VALUE]]: i64) { +// CHECK: acc.parallel vector_length([[I64VALUE]] : i64) { // CHECK-NEXT: } -// CHECK: acc.parallel vector_length([[I32VALUE]]: i32) { +// CHECK: acc.parallel vector_length([[I32VALUE]] : i32) { // CHECK-NEXT: } -// CHECK: acc.parallel vector_length([[IDXVALUE]]: index) { +// CHECK: acc.parallel vector_length([[IDXVALUE]] : index) { // CHECK-NEXT: } -// CHECK: acc.parallel copyin([[ARGA]]: memref<10xf32>, [[ARGB]]: memref<10xf32>) { +// CHECK: acc.parallel copyin([[ARGA]], [[ARGB]] : memref<10xf32>, memref<10xf32>) { // CHECK-NEXT: } -// CHECK: acc.parallel copyin_readonly([[ARGA]]: memref<10xf32>, [[ARGB]]: memref<10xf32>) { +// CHECK: acc.parallel copyin_readonly([[ARGA]], [[ARGB]] : memref<10xf32>, memref<10xf32>) { // CHECK-NEXT: } -// CHECK: acc.parallel copyin([[ARGA]]: memref<10xf32>) copyout_zero([[ARGB]]: memref<10xf32>, [[ARGC]]: memref<10x10xf32>) { +// CHECK: acc.parallel copyin([[ARGA]] : memref<10xf32>) copyout_zero([[ARGB]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>) { // CHECK-NEXT: } -// CHECK: acc.parallel copyout([[ARGB]]: memref<10xf32>, [[ARGC]]: memref<10x10xf32>) create([[ARGA]]: memref<10xf32>) { +// CHECK: acc.parallel copyout([[ARGB]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>) create([[ARGA]] : memref<10xf32>) { // CHECK-NEXT: } -// CHECK: acc.parallel copyout_zero([[ARGB]]: memref<10xf32>, [[ARGC]]: memref<10x10xf32>) create_zero([[ARGA]]: memref<10xf32>) { +// CHECK: acc.parallel copyout_zero([[ARGB]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>) create_zero([[ARGA]] : memref<10xf32>) { // CHECK-NEXT: } -// CHECK: acc.parallel no_create([[ARGA]]: memref<10xf32>) present([[ARGB]]: memref<10xf32>, [[ARGC]]: memref<10x10xf32>) { +// CHECK: acc.parallel no_create([[ARGA]] : memref<10xf32>) present([[ARGB]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>) { // CHECK-NEXT: } -// CHECK: acc.parallel deviceptr([[ARGA]]: memref<10xf32>) attach([[ARGB]]: memref<10xf32>, [[ARGC]]: memref<10x10xf32>) { +// CHECK: acc.parallel attach([[ARGB]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>) deviceptr([[ARGA]] : memref<10xf32>) { // CHECK-NEXT: } -// CHECK: acc.parallel private([[ARGA]]: memref<10xf32>, [[ARGC]]: memref<10x10xf32>) firstprivate([[ARGB]]: memref<10xf32>) { +// CHECK: acc.parallel firstprivate([[ARGB]] : memref<10xf32>) private([[ARGA]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>) { // CHECK-NEXT: } // CHECK: acc.parallel { // CHECK-NEXT: } attributes {defaultAttr = #acc}