MLIR  20.0.0git
Classes | Enumerations | Functions
mlir::acc Namespace Reference

Classes

struct  RuntimeCounters
 
struct  ConstructResource
 
struct  CurrentDeviceIdResource
 

Enumerations

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

Functions

mlir::Value getVar (mlir::Operation *accDataClauseOp)
 Used to obtain the var from a data clause operation. More...
 
mlir::TypedValue< mlir::acc::PointerLikeType > getVarPtr (mlir::Operation *accDataClauseOp)
 Used to obtain the var from a data clause operation if it implements PointerLikeType. More...
 
mlir::Type getVarType (mlir::Operation *accDataClauseOp)
 Used to obtains the varType from a data clause operation which records the type of variable. More...
 
mlir::Value getAccVar (mlir::Operation *accDataClauseOp)
 Used to obtain the accVar from a data clause operation. More...
 
mlir::TypedValue< mlir::acc::PointerLikeType > getAccPtr (mlir::Operation *accDataClauseOp)
 Used to obtain the accVar from a data clause operation if it implements PointerLikeType. More...
 
mlir::Value getVarPtrPtr (mlir::Operation *accDataClauseOp)
 Used to obtain the varPtrPtr from a data clause operation. More...
 
mlir::SmallVector< mlir::ValuegetBounds (mlir::Operation *accDataClauseOp)
 Used to obtain bounds from an acc data clause operation. More...
 
mlir::SmallVector< mlir::ValuegetAsyncOperands (mlir::Operation *accDataClauseOp)
 Used to obtain async operands from an acc data clause operation. More...
 
mlir::ArrayAttr 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. More...
 
mlir::ArrayAttr 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. More...
 
std::optional< llvm::StringRef > getVarName (mlir::Operation *accOp)
 Used to obtain the name from an acc operation. More...
 
std::optional< mlir::acc::DataClause > getDataClause (mlir::Operation *accDataEntryOp)
 Used to obtain the dataClause from a data entry operation. More...
 
bool getImplicitFlag (mlir::Operation *accDataEntryOp)
 Used to find out whether data operation is implicit. More...
 
mlir::ValueRange getDataOperands (mlir::Operation *accOp)
 Used to get an immutable range iterating over the data operands. More...
 
mlir::MutableOperandRange getMutableDataOperands (mlir::Operation *accOp)
 Used to get a mutable range iterating over the data operands. More...
 
bool isPointerLikeType (mlir::Type type)
 Used to check whether the provided type implements the PointerLikeType interface. More...
 
bool isMappableType (mlir::Type type)
 Used to check whether the provided type implements the MappableType interface. More...
 
static constexpr StringLiteral getDeclareAttrName ()
 Used to obtain the attribute name for declare. More...
 
static constexpr StringLiteral getDeclareActionAttrName ()
 
static constexpr StringLiteral getRoutineInfoAttrName ()
 
static constexpr StringLiteral getCombinedConstructsAttrName ()
 

Enumeration Type Documentation

◆ OpenACCExecMapping

Enumeration used to encode the execution mapping on a loop construct.

They refer directly to the OpenACC 3.3 standard: 2.9.2. gang 2.9.3. worker 2.9.4. vector

Value can be combined bitwise to reflect the mapping applied to the construct. e.g. acc.loop gang vector, the gang and vector could be combined and the final mapping value would be 5 (4 | 1).

Enumerator
NONE 
VECTOR 
WORKER 
GANG 

Definition at line 85 of file OpenACC.h.

Function Documentation

◆ getAccPtr()

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.

Definition at line 3110 of file OpenACC.cpp.

◆ getAccVar()

mlir::Value mlir::acc::getAccVar ( mlir::Operation accDataClauseOp)

Used to obtain the accVar from a data clause operation.

When a data entry operation, it obtains its result accVar value. If a data exit operation, it obtains its operand accVar value. Returns empty value if not a data clause operation.

Definition at line 3122 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS, and ACC_DATA_EXIT_OPS.

◆ getAsyncOnly()

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.

Definition at line 3177 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS, and ACC_DATA_EXIT_OPS.

◆ getAsyncOperands()

mlir::SmallVector< mlir::Value > mlir::acc::getAsyncOperands ( mlir::Operation accDataClauseOp)

Used to obtain async operands from an acc data clause operation.

Returns an empty vector if there are no such operands.

Definition at line 3155 of file OpenACC.cpp.

◆ getAsyncOperandsDeviceType()

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.

Definition at line 3169 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS, and ACC_DATA_EXIT_OPS.

◆ getBounds()

mlir::SmallVector< mlir::Value > mlir::acc::getBounds ( mlir::Operation accDataClauseOp)

Used to obtain bounds from an acc data clause operation.

Returns an empty vector if there are no bounds.

Definition at line 3140 of file OpenACC.cpp.

◆ getCombinedConstructsAttrName()

static constexpr StringLiteral mlir::acc::getCombinedConstructsAttrName ( )
staticconstexpr

Definition at line 180 of file OpenACC.h.

◆ getDataClause()

std::optional< mlir::acc::DataClause > mlir::acc::getDataClause ( mlir::Operation accDataEntryOp)

Used to obtain the dataClause from a data entry operation.

Returns empty optional if not a data entry operation.

Definition at line 3195 of file OpenACC.cpp.

Referenced by checkDeclareOperands().

◆ getDataOperands()

mlir::ValueRange mlir::acc::getDataOperands ( mlir::Operation accOp)

Used to get an immutable range iterating over the data operands.

Definition at line 3213 of file OpenACC.cpp.

References ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS.

◆ getDeclareActionAttrName()

static constexpr StringLiteral mlir::acc::getDeclareActionAttrName ( )
staticconstexpr

Definition at line 172 of file OpenACC.h.

◆ getDeclareAttrName()

static constexpr StringLiteral mlir::acc::getDeclareAttrName ( )
staticconstexpr

Used to obtain the attribute name for declare.

Definition at line 168 of file OpenACC.h.

Referenced by checkDeclareOperands().

◆ getImplicitFlag()

bool mlir::acc::getImplicitFlag ( mlir::Operation accDataEntryOp)

Used to find out whether data operation is implicit.

Returns false if not a data operation or if it is a data operation without implicit flag.

Definition at line 3205 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS.

Referenced by checkDeclareOperands().

◆ getMutableDataOperands()

mlir::MutableOperandRange mlir::acc::getMutableDataOperands ( mlir::Operation accOp)

Used to get a mutable range iterating over the data operands.

Definition at line 3223 of file OpenACC.cpp.

References ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS.

◆ getRoutineInfoAttrName()

static constexpr StringLiteral mlir::acc::getRoutineInfoAttrName ( )
staticconstexpr

Definition at line 176 of file OpenACC.h.

◆ getVar()

mlir::Value mlir::acc::getVar ( mlir::Operation accDataClauseOp)

Used to obtain the var from a data clause operation.

Returns empty value if not a data clause operation or is a data exit operation with no var.

Definition at line 3091 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS.

◆ getVarName()

std::optional< llvm::StringRef > mlir::acc::getVarName ( mlir::Operation accOp)

Used to obtain the name from an acc operation.

Definition at line 3184 of file OpenACC.cpp.

Referenced by mlir::tblgen::SymbolInfoMap::SymbolInfo::getArgDecl(), and mlir::tblgen::SymbolInfoMap::SymbolInfo::getVarDecl().

◆ getVarPtr()

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.

Definition at line 3077 of file OpenACC.cpp.

Referenced by checkDeclareOperands().

◆ getVarPtrPtr()

mlir::Value mlir::acc::getVarPtrPtr ( mlir::Operation accDataClauseOp)

Used to obtain the varPtrPtr from a data clause operation.

Returns empty value if not a data clause operation.

Definition at line 3130 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS.

◆ getVarType()

mlir::Type mlir::acc::getVarType ( mlir::Operation accDataClauseOp)

Used to obtains the varType from a data clause operation which records the type of variable.

When var is PointerLikeType, this returns the type of the pointer target.

Definition at line 3099 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS.

◆ isMappableType()

bool mlir::acc::isMappableType ( mlir::Type  type)
inline

Used to check whether the provided type implements the MappableType interface.

Definition at line 163 of file OpenACC.h.

Referenced by mlir::OpTrait::impl::verifyElementwise().

◆ isPointerLikeType()

bool mlir::acc::isPointerLikeType ( mlir::Type  type)
inline

Used to check whether the provided type implements the PointerLikeType interface.

Definition at line 157 of file OpenACC.h.