|
MLIR
22.0.0git
|
Namespaces | |
| detail | |
Classes | |
| class | OpenACCSupport |
| 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::Value > | getBounds (mlir::Operation *accDataClauseOp) |
Used to obtain bounds from an acc data clause operation. More... | |
| mlir::SmallVector< mlir::Value > | getAsyncOperands (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 | getVarNameAttrName () |
| static constexpr StringLiteral | getCombinedConstructsAttrName () |
| mlir::Operation * | getEnclosingComputeOp (mlir::Region ®ion) |
Used to obtain the enclosing compute construct operation that contains the provided region. More... | |
| bool | isOnlyUsedByPrivateClauses (mlir::Value val, mlir::Region ®ion) |
Returns true if this value is only used by acc.private operations in the region. More... | |
| bool | isOnlyUsedByReductionClauses (mlir::Value val, mlir::Region ®ion) |
Returns true if this value is only used by acc.reduction operations in the region. More... | |
| std::optional< ClauseDefaultValue > | getDefaultAttr (mlir::Operation *op) |
Looks for an OpenACC default attribute on the current operation op or in a parent operation which encloses op. More... | |
| mlir::acc::VariableTypeCategory | getTypeCategory (mlir::Value var) |
| Get the type category of an OpenACC variable. More... | |
| std::string | getVariableName (mlir::Value v) |
Attempts to extract the variable name from a value by walking through view-like operations until an acc.var_name attribute is found. More... | |
| std::string | getRecipeName (mlir::acc::RecipeKind kind, mlir::Type type) |
| Get the recipe name for a given recipe kind and type. More... | |
| mlir::Value | getBaseEntity (mlir::Value val) |
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 | |
| 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 4549 of file OpenACC.cpp.
| 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 4561 of file OpenACC.cpp.
References ACC_DATA_ENTRY_OPS, and ACC_DATA_EXIT_OPS.
| 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 4616 of file OpenACC.cpp.
References ACC_DATA_ENTRY_OPS, and ACC_DATA_EXIT_OPS.
| 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 4594 of file OpenACC.cpp.
| 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 4608 of file OpenACC.cpp.
References ACC_DATA_ENTRY_OPS, and ACC_DATA_EXIT_OPS.
| mlir::Value mlir::acc::getBaseEntity | ( | mlir::Value | val | ) |
Definition at line 149 of file OpenACCUtils.cpp.
References mlir::Value::getDefiningOp().
| 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 4579 of file OpenACC.cpp.
|
staticconstexpr |
| 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 4634 of file OpenACC.cpp.
Referenced by checkDeclareOperands().
| mlir::ValueRange mlir::acc::getDataOperands | ( | mlir::Operation * | accOp | ) |
Used to get an immutable range iterating over the data operands.
Definition at line 4652 of file OpenACC.cpp.
References ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS.
|
staticconstexpr |
|
staticconstexpr |
| std::optional< mlir::acc::ClauseDefaultValue > mlir::acc::getDefaultAttr | ( | mlir::Operation * | op | ) |
Looks for an OpenACC default attribute on the current operation op or in a parent operation which encloses op.
This is useful because OpenACC specification notes that a visible default clause is the nearest default clause appearing on the compute construct or a lexically containing data construct.
Definition at line 50 of file OpenACCUtils.cpp.
References mlir::Operation::getParentOp().
| mlir::Operation * mlir::acc::getEnclosingComputeOp | ( | mlir::Region & | region | ) |
Used to obtain the enclosing compute construct operation that contains the provided region.
Returns nullptr if no compute construct operation is found. The returned operation is one of types defined by ACC_COMPUTE_CONSTRUCT_OPS.
Definition at line 16 of file OpenACCUtils.cpp.
References mlir::Operation::getParentOp(), and mlir::Region::getParentOp().
| 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 4644 of file OpenACC.cpp.
References ACC_DATA_ENTRY_OPS.
| mlir::MutableOperandRange mlir::acc::getMutableDataOperands | ( | mlir::Operation * | accOp | ) |
Used to get a mutable range iterating over the data operands.
Definition at line 4662 of file OpenACC.cpp.
References ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS.
| std::string mlir::acc::getRecipeName | ( | mlir::acc::RecipeKind | kind, |
| mlir::Type | type | ||
| ) |
Get the recipe name for a given recipe kind and type.
Returns an empty string if not possible to generate a recipe name.
Definition at line 111 of file OpenACCUtils.cpp.
References kind, and mlir::Type::print().
Referenced by mlir::acc::OpenACCSupport::getRecipeName().
|
staticconstexpr |
| mlir::acc::VariableTypeCategory mlir::acc::getTypeCategory | ( | mlir::Value | var | ) |
Get the type category of an OpenACC variable.
Definition at line 71 of file OpenACCUtils.cpp.
References mlir::Value::getType().
| 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 4530 of file OpenACC.cpp.
References ACC_DATA_ENTRY_OPS.
Referenced by checkDeclareOperands().
| std::string mlir::acc::getVariableName | ( | mlir::Value | v | ) |
Attempts to extract the variable name from a value by walking through view-like operations until an acc.var_name attribute is found.
Returns empty string if no name is found.
Definition at line 84 of file OpenACCUtils.cpp.
References mlir::Value::getDefiningOp(), getVarName(), and getVarNameAttrName().
Referenced by mlir::acc::OpenACCSupport::getVariableName().
| std::optional< llvm::StringRef > mlir::acc::getVarName | ( | mlir::Operation * | accOp | ) |
Used to obtain the name from an acc operation.
Definition at line 4623 of file OpenACC.cpp.
Referenced by mlir::tblgen::SymbolInfoMap::SymbolInfo::getArgDecl(), mlir::tblgen::SymbolInfoMap::SymbolInfo::getVarDecl(), and getVariableName().
|
staticconstexpr |
Definition at line 180 of file OpenACC.h.
Referenced by getVariableName().
| 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 4516 of file OpenACC.cpp.
| 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 4569 of file OpenACC.cpp.
References ACC_DATA_ENTRY_OPS.
| 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 4538 of file OpenACC.cpp.
References ACC_DATA_ENTRY_OPS.
|
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().
| bool mlir::acc::isOnlyUsedByPrivateClauses | ( | mlir::Value | val, |
| mlir::Region & | region | ||
| ) |
Returns true if this value is only used by acc.private operations in the region.
Definition at line 39 of file OpenACCUtils.cpp.
| bool mlir::acc::isOnlyUsedByReductionClauses | ( | mlir::Value | val, |
| mlir::Region & | region | ||
| ) |
Returns true if this value is only used by acc.reduction operations in the region.
Definition at line 44 of file OpenACCUtils.cpp.
|
inline |