1//===-- OpenACCMPOpsInterfaces.td - OpenACC/MP op interfaces - tablegen -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This is the OpenACC/OpenMP Dialect interfaces definition file. 10// 11//===----------------------------------------------------------------------===// 12 13#ifndef OPENACC_MP_COMMON_OPS_INTERFACES 14#define OPENACC_MP_COMMON_OPS_INTERFACES 15 16include "mlir/IR/OpBase.td" 17 18def RecipeInterface : OpInterface<"RecipeInterface"> { 19 let description = [{ 20 OpenACC/OpenMP operations with one or more regions holding executable code. 21 }]; 22 let cppNamespace = "::mlir::accomp"; 23 let methods = [ 24 InterfaceMethod< 25 /*description=*/[{ 26 For the given region of the operation return the block 27 inside the region, where an alloca-like operation should be inserted. 28 The default implementation returns the entry block of the region. 29 }], 30 /*retTy*/"::mlir::Block *", 31 /*methodName=*/"getAllocaBlock", 32 /*args=*/(ins "::mlir::Region &":$region), 33 /*methodBody=*/"", 34 /*defaultImplementation=*/[{ 35 return ®ion.front(); 36 }] 37 >, 38 ]; 39} 40 41#endif // OPENACC_MP_COMMON_OPS_INTERFACES 42