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

Classes

struct  RuntimeCounters
 
struct  ConstructResource
 

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 getVarPtr (mlir::Operation *accDataClauseOp)
 Used to obtain the varPtr from a data clause operation. More...
 
mlir::Value getAccPtr (mlir::Operation *accDataClauseOp)
 Used to obtain the accPtr from a data clause operation. 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...
 
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...
 
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 ()
 
std::unique_ptr< OperationPass< func::FuncOp > > createLegalizeDataInRegion ()
 Create a pass to replace ssa values in region with device/host values. More...
 

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 83 of file OpenACC.h.

Function Documentation

◆ createLegalizeDataInRegion()

std::unique_ptr< OperationPass< func::FuncOp > > mlir::acc::createLegalizeDataInRegion ( )

Create a pass to replace ssa values in region with device/host values.

Definition at line 89 of file LegalizeData.cpp.

◆ getAccPtr()

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

Used to obtain the accPtr from a data clause operation.

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

Definition at line 2851 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 2869 of file OpenACC.cpp.

◆ getCombinedConstructsAttrName()

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

Definition at line 136 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 2894 of file OpenACC.cpp.

◆ getDataOperands()

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

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

Definition at line 2912 of file OpenACC.cpp.

References ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS.

◆ getDeclareActionAttrName()

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

Definition at line 128 of file OpenACC.h.

◆ getDeclareAttrName()

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

Used to obtain the attribute name for declare.

Definition at line 124 of file OpenACC.h.

◆ 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 2904 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS.

◆ getMutableDataOperands()

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

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

Definition at line 2922 of file OpenACC.cpp.

References ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS.

◆ getRoutineInfoAttrName()

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

Definition at line 132 of file OpenACC.h.

◆ getVarName()

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

Used to obtain the name from an acc operation.

Definition at line 2883 of file OpenACC.cpp.

Referenced by mlir::tblgen::SymbolInfoMap::SymbolInfo::getArgDecl().

◆ getVarPtr()

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

Used to obtain the varPtr from a data clause operation.

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

Definition at line 2841 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS.

◆ 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 2859 of file OpenACC.cpp.

References ACC_DATA_ENTRY_OPS.