MLIR 24.0.0git
OpenACC.h File Reference
#include "mlir/Dialect/OpenACC/OpenACCVariableInfo.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/Bytecode/BytecodeOpInterface.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/GPU/IR/GPUBase.h"
#include "mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc"
#include "mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc"
#include "mlir/Dialect/OpenACC/OpenACCOpsInterfaces.h.inc"
#include "mlir/Dialect/OpenACC/OpenACCTypeInterfaces.h.inc"
#include "mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h"
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "mlir/Interfaces/LoopLikeInterface.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Interfaces/ViewLikeInterface.h"
#include "llvm/ADT/SmallVector.h"
#include <variant>
#include "mlir/Dialect/OpenACC/OpenACCOpsTypes.h.inc"
#include "mlir/Dialect/OpenACC/OpenACCOpsAttributes.h.inc"
#include "mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.h"
#include "mlir/Dialect/OpenACC/OpenACCOps.h.inc"

Go to the source code of this file.

Classes

struct  mlir::acc::RuntimeCounters
struct  mlir::acc::ConstructResource
struct  mlir::acc::CurrentDeviceIdResource

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::acc

Macros

#define GET_TYPEDEF_CLASSES
#define GET_ATTRDEF_CLASSES
#define GET_OP_CLASSES
#define ACC_DATA_ENTRY_OPS
#define ACC_DATA_ENTRY_AND_INIT_OPS    ACC_DATA_ENTRY_OPS, mlir::acc::ReductionInitOp
#define ACC_DATA_EXIT_OPS
#define ACC_DATA_CLAUSE_OPS   ACC_DATA_ENTRY_OPS, ACC_DATA_EXIT_OPS
#define ACC_COMPUTE_CONSTRUCT_OPS    mlir::acc::ParallelOp, mlir::acc::KernelsOp, mlir::acc::SerialOp
#define ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS    ACC_COMPUTE_CONSTRUCT_OPS, mlir::acc::LoopOp
#define ACC_DATA_CONSTRUCT_STRUCTURED_OPS    mlir::acc::DataOp, mlir::acc::DeclareOp, mlir::acc::HostDataOp
#define ACC_DATA_CONSTRUCT_UNSTRUCTURED_OPS
#define ACC_DATA_CONSTRUCT_OPS    ACC_DATA_CONSTRUCT_STRUCTURED_OPS, ACC_DATA_CONSTRUCT_UNSTRUCTURED_OPS
#define ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS    ACC_COMPUTE_CONSTRUCT_OPS, ACC_DATA_CONSTRUCT_OPS
#define ACC_COMPUTE_LOOP_AND_DATA_CONSTRUCT_OPS    ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS, ACC_DATA_CONSTRUCT_OPS

Enumerations

enum  mlir::acc::OpenACCExecMapping { mlir::acc::NONE = 0 , mlir::acc::VECTOR = 1 , mlir::acc::WORKER = 2 , mlir::acc::GANG = 4 }
 Enumeration used to encode the execution mapping on a loop construct. More...

Functions

mlir::Value mlir::acc::getVar (mlir::Operation *accDataClauseOp)
 Used to obtain the var from a data clause operation.
mlir::TypedValue< mlir::acc::PointerLikeType > mlir::acc::getVarPtr (mlir::Operation *accDataClauseOp)
 Used to obtain the var from a data clause operation if it implements PointerLikeType.
mlir::Type mlir::acc::getVarType (mlir::Operation *accDataClauseOp)
 Used to obtains the varType from a data clause operation which records the type of variable.
mlir::Value mlir::acc::getAccVar (mlir::Operation *accDataClauseOp)
 Used to obtain the accVar from a data clause operation.
mlir::TypedValue< mlir::acc::PointerLikeType > mlir::acc::getAccPtr (mlir::Operation *accDataClauseOp)
 Used to obtain the accVar from a data clause operation if it implements PointerLikeType.
mlir::Value mlir::acc::getVarPtrPtr (mlir::Operation *accDataClauseOp)
 Used to obtain the varPtrPtr from a data clause operation.
mlir::SmallVector< mlir::Value > mlir::acc::getBounds (mlir::Operation *accDataClauseOp)
 Used to obtain bounds from an acc data clause operation.
mlir::SmallVector< mlir::Value > mlir::acc::getAsyncOperands (mlir::Operation *accDataClauseOp)
 Used to obtain async operands from an acc data clause operation.
mlir::ArrayAttr mlir::acc::getAsyncOperandsDeviceType (mlir::Operation *accDataClauseOp)
 Returns an array of acc:DeviceTypeAttr attributes attached to an acc data clause operation, that correspond to the device types associated with the async clauses with an async-value.
mlir::ArrayAttr mlir::acc::getAsyncOnly (mlir::Operation *accDataClauseOp)
 Returns an array of acc:DeviceTypeAttr attributes attached to an acc data clause operation, that correspond to the device types associated with the async clauses without an async-value.
SmallVector< DeviceType, 3 > mlir::acc::getDeviceTypesByPrecedence (DeviceType deviceType)
 The clauses of a construct can be given once per device type.
std::optional< llvm::StringRef > mlir::acc::getVarName (mlir::Operation *accOp)
 Used to obtain the name from an acc operation.
bool mlir::acc::isDataEntryOp (mlir::Operation *op)
 Used to find out whether op is a data entry operation or an acc.map_info.
std::optional< mlir::acc::DataClause > mlir::acc::getDataClause (mlir::Operation *accDataEntryOp)
 Used to obtain the dataClause from a data entry operation.
bool mlir::acc::getImplicitFlag (mlir::Operation *accDataEntryOp)
 Used to find out whether data operation is implicit.
bool mlir::acc::getSyntheticFlag (mlir::Operation *accDataClauseOp)
 Used to find out whether the implementation created the data operation for its own bookkeeping, instead of to represent a data attribute of the program being compiled.
mlir::ValueRange mlir::acc::getDataOperands (mlir::Operation *accOp)
 Used to get an immutable range iterating over the data operands.
mlir::MutableOperandRange mlir::acc::getMutableDataOperands (mlir::Operation *accOp)
 Used to get a mutable range iterating over the data operands.
mlir::SymbolRefAttr mlir::acc::getRecipe (mlir::Operation *accOp)
 Used to get the recipe attribute from a data clause operation.
bool mlir::acc::isPointerLikeType (mlir::Type type)
 Used to check whether the provided type implements the PointerLikeType interface.
bool mlir::acc::isMappableType (mlir::Type type)
 Used to check whether the provided type implements the MappableType interface.
static constexpr StringLiteral mlir::acc::getDeclareAttrName ()
 Used to obtain the attribute name for declare.
static constexpr StringLiteral mlir::acc::getDeclareActionAttrName ()
static constexpr StringLiteral mlir::acc::getRoutineInfoAttrName ()
static constexpr StringLiteral mlir::acc::getSpecializedRoutineAttrName ()
bool mlir::acc::isAccRoutine (mlir::Operation *op)
 Used to check whether the current operation is marked with acc routine.
bool mlir::acc::isSpecializedAccRoutine (mlir::Operation *op)
 Used to check whether this is a specialized accelerator version of acc routine function.
static constexpr StringLiteral mlir::acc::getFromDefaultClauseAttrName ()
static constexpr StringLiteral mlir::acc::getNoDeviceDescriptorAttrName ()
 Name for a unit attribute on a data entry operation stating that nothing in the region reads the descriptor its variable is reached through, so the mapping supplies the bounds but needs no device copy of the descriptor.
static constexpr StringLiteral mlir::acc::getCollapseCountAttrName ()
 Name for an attribute attached to a loop indicating the number of loops collapsed to create that loop.
static constexpr StringLiteral mlir::acc::getUnstructuredIndependentLoopAttrName ()
 Name for a unit attribute attached to the region an unstructured independent loop was converted to, recording that the loop could not be represented as a structured loop and is therefore not parallelized.
static constexpr StringLiteral mlir::acc::getVarNameAttrName ()
static constexpr StringLiteral mlir::acc::getCombinedConstructsAttrName ()
template<typename ComputeOpT>
bool mlir::acc::isGangWorkerVectorAllOne (ComputeOpT op)

Macro Definition Documentation

◆ ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS

#define ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS    ACC_COMPUTE_CONSTRUCT_OPS, ACC_DATA_CONSTRUCT_OPS

Definition at line 75 of file OpenACC.h.

Referenced by mlir::acc::getDataOperands(), and mlir::acc::getMutableDataOperands().

◆ ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS

#define ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS    ACC_COMPUTE_CONSTRUCT_OPS, mlir::acc::LoopOp

Definition at line 66 of file OpenACC.h.

◆ ACC_COMPUTE_CONSTRUCT_OPS

#define ACC_COMPUTE_CONSTRUCT_OPS    mlir::acc::ParallelOp, mlir::acc::KernelsOp, mlir::acc::SerialOp

◆ ACC_COMPUTE_LOOP_AND_DATA_CONSTRUCT_OPS

#define ACC_COMPUTE_LOOP_AND_DATA_CONSTRUCT_OPS    ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS, ACC_DATA_CONSTRUCT_OPS

Definition at line 77 of file OpenACC.h.

◆ ACC_DATA_CLAUSE_OPS

#define ACC_DATA_CLAUSE_OPS   ACC_DATA_ENTRY_OPS, ACC_DATA_EXIT_OPS

Definition at line 63 of file OpenACC.h.

Referenced by mlir::acc::getSyntheticFlag().

◆ ACC_DATA_CONSTRUCT_OPS

Definition at line 73 of file OpenACC.h.

◆ ACC_DATA_CONSTRUCT_STRUCTURED_OPS

#define ACC_DATA_CONSTRUCT_STRUCTURED_OPS    mlir::acc::DataOp, mlir::acc::DeclareOp, mlir::acc::HostDataOp

Definition at line 68 of file OpenACC.h.

◆ ACC_DATA_CONSTRUCT_UNSTRUCTURED_OPS

#define ACC_DATA_CONSTRUCT_UNSTRUCTURED_OPS
Value:
mlir::acc::EnterDataOp, mlir::acc::ExitDataOp, mlir::acc::UpdateOp, \
mlir::acc::DeclareEnterOp, mlir::acc::DeclareExitOp

Definition at line 70 of file OpenACC.h.

◆ ACC_DATA_ENTRY_AND_INIT_OPS

#define ACC_DATA_ENTRY_AND_INIT_OPS    ACC_DATA_ENTRY_OPS, mlir::acc::ReductionInitOp

Definition at line 58 of file OpenACC.h.

◆ ACC_DATA_ENTRY_OPS

#define ACC_DATA_ENTRY_OPS
Value:
mlir::acc::CopyinOp, mlir::acc::CreateOp, mlir::acc::PresentOp, \
mlir::acc::NoCreateOp, mlir::acc::AttachOp, mlir::acc::DevicePtrOp, \
mlir::acc::GetDevicePtrOp, mlir::acc::PrivateOp, \
mlir::acc::FirstprivateOp, mlir::acc::FirstprivateMapInitialOp, \
mlir::acc::UpdateDeviceOp, mlir::acc::UseDeviceOp, \
mlir::acc::ReductionOp, mlir::acc::DeclareDeviceResidentOp, \
mlir::acc::DeclareLinkOp, mlir::acc::CacheOp

Definition at line 50 of file OpenACC.h.

Referenced by mlir::acc::getAccVar(), mlir::acc::getAsyncOnly(), mlir::acc::getAsyncOperandsDeviceType(), mlir::acc::getEntryModifiers(), mlir::acc::getImplicitFlag(), mlir::acc::getRecipe(), mlir::acc::getVar(), mlir::acc::getVarPtrPtr(), and mlir::acc::getVarType().

◆ ACC_DATA_EXIT_OPS

#define ACC_DATA_EXIT_OPS
Value:
mlir::acc::CopyoutOp, mlir::acc::DeleteOp, mlir::acc::DetachOp, \
mlir::acc::UpdateHostOp

Definition at line 60 of file OpenACC.h.

Referenced by mlir::acc::getAccVar(), mlir::acc::getAsyncOnly(), mlir::acc::getAsyncOperandsDeviceType(), and mlir::acc::getPairedDataExitOps().

◆ GET_ATTRDEF_CLASSES

#define GET_ATTRDEF_CLASSES

Definition at line 42 of file OpenACC.h.

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 47 of file OpenACC.h.

◆ GET_TYPEDEF_CLASSES

#define GET_TYPEDEF_CLASSES

Definition at line 39 of file OpenACC.h.