[Mlir-commits] [mlir] 0c4d7d1 - [mlir][openacc] Add ReturnLike trait to acc.yield operation

Valentin Clement llvmlistbot at llvm.org
Tue May 16 08:44:05 PDT 2023


Author: Valentin Clement
Date: 2023-05-16T08:43:58-07:00
New Revision: 0c4d7d14e94de5130d7747bde70c94bce77bb754

URL: https://github.com/llvm/llvm-project/commit/0c4d7d14e94de5130d7747bde70c94bce77bb754
DIFF: https://github.com/llvm/llvm-project/commit/0c4d7d14e94de5130d7747bde70c94bce77bb754.diff

LOG: [mlir][openacc] Add ReturnLike trait to acc.yield operation

Just add the trait as acc.yield is a return like op.

Reviewed By: razvanlupusoru, jeanPerier

Differential Revision: https://reviews.llvm.org/D150617

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/OpenACC/OpenACC.h
    mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/OpenACC/OpenACC.h b/mlir/include/mlir/Dialect/OpenACC/OpenACC.h
index 4e7db76bc0a31..aadcfff93238a 100644
--- a/mlir/include/mlir/Dialect/OpenACC/OpenACC.h
+++ b/mlir/include/mlir/Dialect/OpenACC/OpenACC.h
@@ -20,6 +20,7 @@
 #include "mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc"
 #include "mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc"
 #include "mlir/Dialect/OpenACC/OpenACCTypeInterfaces.h.inc"
+#include "mlir/Interfaces/ControlFlowInterfaces.h"
 #include "mlir/Interfaces/SideEffectInterfaces.h"
 
 #define GET_TYPEDEF_CLASSES

diff  --git a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
index 52bbdbb2aee84..f920f7e9b95db 100644
--- a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
+++ b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
@@ -13,6 +13,7 @@
 #ifndef OPENACC_OPS
 #define OPENACC_OPS
 
+include "mlir/Interfaces/ControlFlowInterfaces.td"
 include "mlir/Interfaces/SideEffectInterfaces.td"
 include "mlir/IR/BuiltinTypes.td"
 include "mlir/IR/EnumAttr.td"
@@ -859,7 +860,7 @@ def OpenACC_LoopOp : OpenACC_Op<"loop",
 }
 
 // Yield operation for the acc.loop and acc.parallel operations.
-def OpenACC_YieldOp : OpenACC_Op<"yield", [Terminator,
+def OpenACC_YieldOp : OpenACC_Op<"yield", [ReturnLike, Terminator,
     ParentOneOf<["ParallelOp, LoopOp, SerialOp"]>]> {
   let summary = "Acc yield and termination operation";
 


        


More information about the Mlir-commits mailing list