13 #ifndef MLIR_DIALECT_OPENACC_OPENACC_H_
14 #define MLIR_DIALECT_OPENACC_OPENACC_H_
23 #include "mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc"
24 #include "mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc"
25 #include "mlir/Dialect/OpenACC/OpenACCTypeInterfaces.h.inc"
30 #define GET_TYPEDEF_CLASSES
31 #include "mlir/Dialect/OpenACC/OpenACCOpsTypes.h.inc"
33 #define GET_ATTRDEF_CLASSES
34 #include "mlir/Dialect/OpenACC/OpenACCOpsAttributes.h.inc"
38 #define GET_OP_CLASSES
39 #include "mlir/Dialect/OpenACC/OpenACCOps.h.inc"
41 #define ACC_DATA_ENTRY_OPS \
42 mlir::acc::CopyinOp, mlir::acc::CreateOp, mlir::acc::PresentOp, \
43 mlir::acc::NoCreateOp, mlir::acc::AttachOp, mlir::acc::DevicePtrOp, \
44 mlir::acc::GetDevicePtrOp, mlir::acc::PrivateOp, \
45 mlir::acc::FirstprivateOp, mlir::acc::UpdateDeviceOp, \
46 mlir::acc::UseDeviceOp, mlir::acc::ReductionOp, \
47 mlir::acc::DeclareDeviceResidentOp, mlir::acc::DeclareLinkOp, \
49 #define ACC_COMPUTE_CONSTRUCT_OPS \
50 mlir::acc::ParallelOp, mlir::acc::KernelsOp, mlir::acc::SerialOp
51 #define ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS \
52 ACC_COMPUTE_CONSTRUCT_OPS, mlir::acc::LoopOp
53 #define ACC_DATA_CONSTRUCT_OPS \
54 mlir::acc::DataOp, mlir::acc::EnterDataOp, mlir::acc::ExitDataOp, \
55 mlir::acc::UpdateOp, mlir::acc::HostDataOp, mlir::acc::DeclareEnterOp, \
56 mlir::acc::DeclareExitOp, mlir::acc::DeclareOp
57 #define ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS \
58 ACC_COMPUTE_CONSTRUCT_OPS, ACC_DATA_CONSTRUCT_OPS
59 #define ACC_COMPUTE_LOOP_AND_DATA_CONSTRUCT_OPS \
60 ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS, ACC_DATA_CONSTRUCT_OPS
82 std::optional<mlir::acc::DataClause>
92 return StringLiteral(
"acc.declare");
96 return StringLiteral(
"acc.declare_action");
100 return StringLiteral(
"acc.routine_info");
Operation is the basic unit of execution within MLIR.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
std::optional< mlir::acc::DataClause > getDataClause(mlir::Operation *accDataEntryOp)
Used to obtain the dataClause from a data entry operation.
OpenACCExecMapping
Enumeration used to encode the execution mapping on a loop construct.
static constexpr StringLiteral getRoutineInfoAttrName()
mlir::Value getVarPtr(mlir::Operation *accDataEntryOp)
Used to obtain the varPtr from a data entry operation.
bool getImplicitFlag(mlir::Operation *accDataEntryOp)
Used to find out whether data operation is implicit.
static constexpr StringLiteral getDeclareAttrName()
Used to obtain the attribute name for declare.
static constexpr StringLiteral getDeclareActionAttrName()
Include the generated interface declarations.