[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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user