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 @@ -94,12 +94,15 @@ }]; let arguments = (ins Optional:$async, + OptionalAttr:$async_attr, Variadic:$waitOperands, + OptionalAttr:$wait_attr, Optional:$numGangs, Optional:$numWorkers, Optional:$vectorLength, Optional:$ifCond, Optional:$selfCond, + OptionalAttr:$self_attr, OptionalAttr:$reductionOp, Variadic:$reductionOperands, Variadic:$copyOperands, @@ -121,12 +124,15 @@ let extraClassDeclaration = [{ static StringRef getAsyncKeyword() { return "async"; } + static StringRef getAsyncAttrName() { return "async_attr"; } static StringRef getWaitKeyword() { return "wait"; } + static StringRef getWaitAttrName() { return "wait_attr"; } 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 "self_attr"; } static StringRef getReductionKeyword() { return "reduction"; } static StringRef getCopyKeyword() { return "copy"; } static StringRef getCopyinKeyword() { return "copyin"; } @@ -310,4 +316,3 @@ } #endif // OPENACC_OPS - 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 @@ -379,6 +379,12 @@ } attributes {defaultAttr = "none"} acc.parallel { } attributes {defaultAttr = "present"} + acc.parallel { + } attributes {async_attr} + acc.parallel { + } attributes {wait_attr} + acc.parallel { + } attributes {self_attr} return } @@ -438,6 +444,12 @@ // CHECK-NEXT: } attributes {defaultAttr = "none"} // CHECK: acc.parallel { // CHECK-NEXT: } attributes {defaultAttr = "present"} +// CHECK: acc.parallel { +// CHECK-NEXT: } attributes {async_attr} +// CHECK: acc.parallel { +// CHECK-NEXT: } attributes {wait_attr} +// CHECK: acc.parallel { +// CHECK-NEXT: } attributes {self_attr} // -----