From 7a6627b83539cc3b7970764e96dcfc2c9607b47f Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Fri, 11 Sep 2020 21:38:25 +0100 Subject: [PATCH] [OpenMP][MLIR] Add assembly format for master op Reviewed By: SouraVX, kiranktp Differential Revision: https://reviews.llvm.org/D87549 --- mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | 2 ++ mlir/test/Dialect/OpenMP/ops.mlir | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td index 3ac7f2c5dda5..ae0a5f3b6faa 100644 --- a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td +++ b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td @@ -138,6 +138,8 @@ def MasterOp : OpenMP_Op<"master"> { }]; let regions = (region AnyRegion:$region); + + let assemblyFormat = "$region attr-dict"; } //===----------------------------------------------------------------------===// diff --git a/mlir/test/Dialect/OpenMP/ops.mlir b/mlir/test/Dialect/OpenMP/ops.mlir index e3e7afaff541..cfcfe0db2a15 100644 --- a/mlir/test/Dialect/OpenMP/ops.mlir +++ b/mlir/test/Dialect/OpenMP/ops.mlir @@ -8,10 +8,11 @@ func @omp_barrier() -> () { func @omp_master() -> () { // CHECK: omp.master - "omp.master" ()({ + omp.master { // CHECK: omp.terminator omp.terminator - }):()->() + } + return }