|
MLIR 22.0.0git
|
Namespaces | |
| namespace | detail |
| namespace | impl |
Classes | |
| class | ACCDeclareEnterOpConversion |
| Pattern to erase acc.declare_enter and its associated acc.declare_exit. More... | |
| struct | ACCImplicitDataOptions |
| struct | ACCImplicitRoutineOptions |
| struct | ACCLoopTilingOptions |
| class | ACCOpEraseConversion |
| Pattern to simply erase an ACC op (for ops with no results). More... | |
| class | ACCOpReplaceWithVarConversion |
| Pattern to replace an ACC op with its var operand. More... | |
| class | ACCRegionUnwrapConversion |
| Pattern to unwrap a region from an ACC op and erase the wrapper. More... | |
| struct | ACCSpecializeForHostOptions |
| struct | ConstructResource |
| struct | CurrentDeviceIdResource |
| struct | LegalizeDataValuesInRegionOptions |
| class | OpenACCSupport |
| struct | RuntimeCounters |
Enumerations | |
| enum | OpenACCExecMapping { NONE = 0 , VECTOR = 1 , WORKER = 2 , GANG = 4 } |
| Enumeration used to encode the execution mapping on a loop construct. More... | |
Functions | |
| bool | isValidSymbolUse (Operation *user, SymbolRefAttr symbol, Operation **definingOpPtr) |
| remark::detail::InFlightRemark | emitRemark (Operation *op, const Twine &message, llvm::StringRef category) |
| mlir::Value | getVar (mlir::Operation *accDataClauseOp) |
| Used to obtain the var from a data clause operation. | |
| mlir::TypedValue< mlir::acc::PointerLikeType > | getVarPtr (mlir::Operation *accDataClauseOp) |
| Used to obtain the var from a data clause operation if it implements PointerLikeType. | |
| mlir::Type | getVarType (mlir::Operation *accDataClauseOp) |
| Used to obtains the varType from a data clause operation which records the type of variable. | |
| mlir::Value | getAccVar (mlir::Operation *accDataClauseOp) |
| Used to obtain the accVar from a data clause operation. | |
| mlir::TypedValue< mlir::acc::PointerLikeType > | getAccPtr (mlir::Operation *accDataClauseOp) |
| Used to obtain the accVar from a data clause operation if it implements PointerLikeType. | |
| mlir::Value | getVarPtrPtr (mlir::Operation *accDataClauseOp) |
| Used to obtain the varPtrPtr from a data clause operation. | |
| mlir::SmallVector< mlir::Value > | getBounds (mlir::Operation *accDataClauseOp) |
| Used to obtain bounds from an acc data clause operation. | |
| mlir::SmallVector< mlir::Value > | getAsyncOperands (mlir::Operation *accDataClauseOp) |
| Used to obtain async operands from an acc data clause operation. | |
| 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. | |
| 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. | |
| std::optional< llvm::StringRef > | getVarName (mlir::Operation *accOp) |
| Used to obtain the name from an acc operation. | |
| std::optional< mlir::acc::DataClause > | getDataClause (mlir::Operation *accDataEntryOp) |
| Used to obtain the dataClause from a data entry operation. | |
| bool | getImplicitFlag (mlir::Operation *accDataEntryOp) |
| Used to find out whether data operation is implicit. | |
| mlir::ValueRange | getDataOperands (mlir::Operation *accOp) |
| Used to get an immutable range iterating over the data operands. | |
| mlir::MutableOperandRange | getMutableDataOperands (mlir::Operation *accOp) |
| Used to get a mutable range iterating over the data operands. | |
| mlir::SymbolRefAttr | getRecipe (mlir::Operation *accOp) |
| Used to get the recipe attribute from a data clause operation. | |
| bool | isPointerLikeType (mlir::Type type) |
| Used to check whether the provided type implements the PointerLikeType interface. | |
| bool | isMappableType (mlir::Type type) |
| Used to check whether the provided type implements the MappableType interface. | |
| static constexpr StringLiteral | getDeclareAttrName () |
| Used to obtain the attribute name for declare. | |
| static constexpr StringLiteral | getDeclareActionAttrName () |
| static constexpr StringLiteral | getRoutineInfoAttrName () |
| static constexpr StringLiteral | getSpecializedRoutineAttrName () |
| bool | isAccRoutine (mlir::Operation *op) |
| Used to check whether the current operation is marked with acc routine. | |
| bool | isSpecializedAccRoutine (mlir::Operation *op) |
| Used to check whether this is a specialized accelerator version of acc routine function. | |
| static constexpr StringLiteral | getFromDefaultClauseAttrName () |
| 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. | |
| bool | isOnlyUsedByPrivateClauses (mlir::Value val, mlir::Region ®ion) |
| Returns true if this value is only used by acc.private operations in the region. | |
| bool | isOnlyUsedByReductionClauses (mlir::Value val, mlir::Region ®ion) |
| Returns true if this value is only used by acc.reduction operations in the region. | |
| 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. | |
| mlir::acc::VariableTypeCategory | getTypeCategory (mlir::Value var) |
| Get the type category of an OpenACC variable. | |
| 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. | |
| std::string | getRecipeName (mlir::acc::RecipeKind kind, mlir::Type type) |
| Get the recipe name for a given recipe kind and type. | |
| mlir::Value | getBaseEntity (mlir::Value val) |
| bool | isValidSymbolUse (mlir::Operation *user, mlir::SymbolRefAttr symbol, mlir::Operation **definingOpPtr=nullptr) |
| Check if a symbol use is valid for use in an OpenACC region. | |
| llvm::SmallVector< mlir::Value > | getDominatingDataClauses (mlir::Operation *computeConstructOp, mlir::DominanceInfo &domInfo, mlir::PostDominanceInfo &postDomInfo) |
| Collects all data clauses that dominate the compute construct. | |
| remark::detail::InFlightRemark | emitRemark (mlir::Operation *op, const llvm::Twine &message, llvm::StringRef category="openacc") |
| Emit an OpenACC remark for the given operation with the given message. | |
| scf::ForOp | convertACCLoopToSCFFor (LoopOp loopOp, RewriterBase &rewriter, bool enableCollapse) |
| Convert a structured acc.loop to scf.for. | |
| scf::ParallelOp | convertACCLoopToSCFParallel (LoopOp loopOp, RewriterBase &rewriter) |
| Convert acc.loop to scf.parallel. | |
| scf::ExecuteRegionOp | convertUnstructuredACCLoopToSCFExecuteRegion (LoopOp loopOp, RewriterBase &rewriter) |
| Convert an unstructured acc.loop to scf.execute_region. | |
| llvm::SmallVector< mlir::acc::LoopOp > | uncollapseLoops (mlir::acc::LoopOp origLoop, unsigned tileCount, unsigned collapseCount, mlir::RewriterBase &rewriter) |
| Uncollapse tile loops with multiple IVs and collapseCount < tileCount. | |
| mlir::acc::LoopOp | tileACCLoops (llvm::SmallVector< mlir::acc::LoopOp > &tileLoops, const llvm::SmallVector< mlir::Value > &tileSizes, int32_t defaultTileSize, mlir::RewriterBase &rewriter) |
| Tile ACC loops according to the given tile sizes. | |
| std::unique_ptr<::mlir::Pass > | createACCIfClauseLowering () |
| std::unique_ptr<::mlir::Pass > | createACCImplicitData () |
| std::unique_ptr<::mlir::Pass > | createACCImplicitData (ACCImplicitDataOptions options) |
| std::unique_ptr<::mlir::Pass > | createACCImplicitDeclare () |
| std::unique_ptr<::mlir::Pass > | createACCImplicitRoutine () |
| std::unique_ptr<::mlir::Pass > | createACCImplicitRoutine (ACCImplicitRoutineOptions options) |
| std::unique_ptr<::mlir::Pass > | createACCLegalizeSerial () |
| std::unique_ptr<::mlir::Pass > | createACCLoopTiling () |
| std::unique_ptr<::mlir::Pass > | createACCLoopTiling (ACCLoopTilingOptions options) |
| std::unique_ptr<::mlir::Pass > | createACCSpecializeForDevice () |
| std::unique_ptr<::mlir::Pass > | createACCSpecializeForHost () |
| std::unique_ptr<::mlir::Pass > | createACCSpecializeForHost (ACCSpecializeForHostOptions options) |
| std::unique_ptr<::mlir::Pass > | createLegalizeDataValuesInRegion () |
| std::unique_ptr<::mlir::Pass > | createLegalizeDataValuesInRegion (LegalizeDataValuesInRegionOptions options) |
| void | populateACCSpecializeForDevicePatterns (RewritePatternSet &patterns) |
| Populates all patterns for device specialization. | |
| void | populateACCOrphanToHostPatterns (RewritePatternSet &patterns, OpenACCSupport &accSupport, bool enableLoopConversion=true) |
| Populates patterns for converting orphan ACC operations to host. | |
| void | populateACCHostFallbackPatterns (RewritePatternSet &patterns, OpenACCSupport &accSupport, bool enableLoopConversion=true) |
| Populates all patterns for host fallback path (when if clause evaluates to false). | |
| void | registerACCIfClauseLowering () |
| void | registerACCIfClauseLoweringPass () |
| void | registerACCImplicitData () |
| void | registerACCImplicitDataPass () |
| void | registerACCImplicitDeclare () |
| void | registerACCImplicitDeclarePass () |
| void | registerACCImplicitRoutine () |
| void | registerACCImplicitRoutinePass () |
| void | registerACCLegalizeSerial () |
| void | registerACCLegalizeSerialPass () |
| void | registerACCLoopTiling () |
| void | registerACCLoopTilingPass () |
| void | registerACCSpecializeForDevice () |
| void | registerACCSpecializeForDevicePass () |
| void | registerACCSpecializeForHost () |
| void | registerACCSpecializeForHostPass () |
| void | registerLegalizeDataValuesInRegion () |
| void | registerLegalizeDataValuesInRegionPass () |
| void | registerOpenACCPasses () |
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 | |
| scf::ForOp mlir::acc::convertACCLoopToSCFFor | ( | LoopOp | loopOp, |
| RewriterBase & | rewriter, | ||
| bool | enableCollapse ) |
Convert a structured acc.loop to scf.for.
The loop arguments are converted to index type. If enableCollapse is true, nested loops are collapsed into a single loop.
| loopOp | The acc.loop operation to convert (must not be unstructured) |
| rewriter | RewriterBase for creating operations |
| enableCollapse | Whether to collapse nested loops into one |
Definition at line 179 of file OpenACCUtilsLoop.cpp.
References mlir::coalesceLoops(), mlir::Builder::getIndexType(), mlir::OpBuilder::getInsertionPoint(), mlir::getValueOrCreateCastToIndexLike(), mlir::IRMapping::map(), mlir::OpBuilder::setInsertionPoint(), and mlir::OpBuilder::setInsertionPointToStart().
| scf::ParallelOp mlir::acc::convertACCLoopToSCFParallel | ( | LoopOp | loopOp, |
| RewriterBase & | rewriter ) |
Convert acc.loop to scf.parallel.
The loop induction variables are converted to index types.
| loopOp | The acc.loop operation to convert |
| rewriter | RewriterBase for creating and erasing operations |
Definition at line 236 of file OpenACCUtilsLoop.cpp.
References mlir::arith::ConstantIndexOp::create(), mlir::RewriterBase::eraseOp(), mlir::OpBuilder::getInsertionBlock(), mlir::OpBuilder::getInsertionPoint(), mlir::Block::getParentOp(), mlir::OpBuilder::setInsertionPointToStart(), and mlir::Value::use_empty().
| scf::ExecuteRegionOp mlir::acc::convertUnstructuredACCLoopToSCFExecuteRegion | ( | LoopOp | loopOp, |
| RewriterBase & | rewriter ) |
Convert an unstructured acc.loop to scf.execute_region.
| loopOp | The acc.loop operation to convert (must be unstructured) |
| rewriter | RewriterBase for creating and erasing operations |
Definition at line 300 of file OpenACCUtilsLoop.cpp.
References mlir::OpBuilder::getInsertionBlock(), and mlir::Block::getParentOp().
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCIfClauseLowering | ( | ) |
We declare an explicit private instantiation because Pass classes should only be visible by the current library.
Definition at line 88 of file ACCIfClauseLowering.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCImplicitData | ( | ) |
Definition at line 181 of file ACCImplicitData.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCImplicitData | ( | ACCImplicitDataOptions | options | ) |
Definition at line 185 of file ACCImplicitData.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCImplicitDeclare | ( | ) |
We declare an explicit private instantiation because Pass classes should only be visible by the current library.
Definition at line 260 of file ACCImplicitDeclare.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCImplicitRoutine | ( | ) |
Definition at line 357 of file ACCImplicitRoutine.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCImplicitRoutine | ( | ACCImplicitRoutineOptions | options | ) |
Definition at line 361 of file ACCImplicitRoutine.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCLegalizeSerial | ( | ) |
We declare an explicit private instantiation because Pass classes should only be visible by the current library.
Definition at line 437 of file ACCLegalizeSerial.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCLoopTiling | ( | ) |
Definition at line 529 of file ACCLoopTiling.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCLoopTiling | ( | ACCLoopTilingOptions | options | ) |
Definition at line 533 of file ACCLoopTiling.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCSpecializeForDevice | ( | ) |
We declare an explicit private instantiation because Pass classes should only be visible by the current library.
Definition at line 608 of file ACCSpecializeForDevice.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCSpecializeForHost | ( | ) |
Definition at line 700 of file ACCSpecializeForHost.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createACCSpecializeForHost | ( | ACCSpecializeForHostOptions | options | ) |
Definition at line 704 of file ACCSpecializeForHost.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createLegalizeDataValuesInRegion | ( | ) |
Definition at line 798 of file LegalizeDataValues.cpp.
| std::unique_ptr<::mlir::Pass > mlir::acc::createLegalizeDataValuesInRegion | ( | LegalizeDataValuesInRegionOptions | options | ) |
Definition at line 802 of file LegalizeDataValues.cpp.
| mlir::remark::detail::InFlightRemark mlir::acc::emitRemark | ( | mlir::Operation * | op, |
| const llvm::Twine & | message, | ||
| llvm::StringRef | category = "openacc" ) |
Emit an OpenACC remark for the given operation with the given message.
| op | The operation to emit the remark for. |
| message | The remark message. |
| category | Optional category for the remark. Defaults to "openacc". |
Definition at line 271 of file OpenACCUtils.cpp.
References mlir::Attribute::getContext(), mlir::Operation::getLoc(), mlir::Operation::getParentOfType(), mlir::MLIRContext::getRemarkEngine(), and mlir::remark::RemarkOpts::name().
| remark::detail::InFlightRemark mlir::acc::emitRemark | ( | Operation * | op, |
| const Twine & | message, | ||
| llvm::StringRef | category ) |
| 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 4842 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 4854 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 4909 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 4887 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 4901 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 154 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 4872 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 4927 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 4945 of file OpenACC.cpp.
References ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS.
|
staticconstexpr |
|
staticconstexpr |
Used to obtain the attribute name for declare.
Definition at line 171 of file OpenACC.h.
Referenced by isValidSymbolUse().
| 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 55 of file OpenACCUtils.cpp.
References mlir::Operation::getParentOp().
| llvm::SmallVector< mlir::Value > mlir::acc::getDominatingDataClauses | ( | mlir::Operation * | computeConstructOp, |
| mlir::DominanceInfo & | domInfo, | ||
| mlir::PostDominanceInfo & | postDomInfo ) |
Collects all data clauses that dominate the compute construct.
This includes data clauses from:
| computeConstructOp | The compute construct operation |
| domInfo | Dominance information |
| postDomInfo | Post-dominance information |
Definition at line 212 of file OpenACCUtils.cpp.
References mlir::DominanceInfo::dominates(), mlir::Operation::getParentOfType(), and 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 21 of file OpenACCUtils.cpp.
References mlir::Operation::getParentOp(), and mlir::Region::getParentOp().
|
staticconstexpr |
| 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 4937 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 4955 of file OpenACC.cpp.
References ACC_COMPUTE_AND_DATA_CONSTRUCT_OPS.
| mlir::SymbolRefAttr mlir::acc::getRecipe | ( | mlir::Operation * | accOp | ) |
Used to get the recipe attribute from a data clause operation.
Definition at line 4964 of file OpenACC.cpp.
References ACC_DATA_ENTRY_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 116 of file OpenACCUtils.cpp.
References mlir::Type::print().
Referenced by mlir::acc::OpenACCSupport::getRecipeName().
|
staticconstexpr |
Definition at line 179 of file OpenACC.h.
Referenced by isAccRoutine(), and isValidSymbolUse().
|
staticconstexpr |
Definition at line 183 of file OpenACC.h.
Referenced by isSpecializedAccRoutine().
| mlir::acc::VariableTypeCategory mlir::acc::getTypeCategory | ( | mlir::Value | var | ) |
Get the type category of an OpenACC variable.
Definition at line 76 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 4823 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 89 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 4916 of file OpenACC.cpp.
Referenced by getVariableName().
|
staticconstexpr |
Definition at line 203 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 4809 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 4862 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 4831 of file OpenACC.cpp.
References ACC_DATA_ENTRY_OPS.
|
inline |
Used to check whether the current operation is marked with acc routine.
The operation passed in should be a function.
Definition at line 189 of file OpenACC.h.
References getRoutineInfoAttrName(), and mlir::Operation::hasAttr().
|
inline |
Used to check whether the provided type implements the MappableType interface.
Definition at line 166 of file OpenACC.h.
Referenced by checkRecipe().
| 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 44 of file OpenACCUtils.cpp.
References isOnlyUsedByOpClauses().
| 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 49 of file OpenACCUtils.cpp.
References isOnlyUsedByOpClauses().
|
inline |
|
inline |
Used to check whether this is a specialized accelerator version of acc routine function.
Definition at line 195 of file OpenACC.h.
References getSpecializedRoutineAttrName(), and mlir::Operation::hasAttr().
| bool mlir::acc::isValidSymbolUse | ( | mlir::Operation * | user, |
| mlir::SymbolRefAttr | symbol, | ||
| mlir::Operation ** | definingOpPtr = nullptr ) |
Check if a symbol use is valid for use in an OpenACC region.
This includes looking for various attributes such as acc.routine_info and acc.declare attributes.
| user | The operation using the symbol |
| symbol | The symbol reference being used |
| definingOpPtr | Optional output parameter to receive the defining op |
Definition at line 164 of file OpenACCUtils.cpp.
References getDeclareAttrName(), getRoutineInfoAttrName(), mlir::Operation::hasAttr(), mlir::SymbolTable::lookupNearestSymbolFrom(), and mlir::SymbolTable::Private.
| void mlir::acc::populateACCHostFallbackPatterns | ( | RewritePatternSet & | patterns, |
| OpenACCSupport & | accSupport, | ||
| bool | enableLoopConversion = true ) |
Populates all patterns for host fallback path (when if clause evaluates to false).
In this mode, ALL ACC operations should be converted or removed.
| enableLoopConversion | Whether to convert orphan acc.loop operations. |
Definition at line 397 of file ACCSpecializeForHost.cpp.
References mlir::patterns.
| void mlir::acc::populateACCOrphanToHostPatterns | ( | RewritePatternSet & | patterns, |
| OpenACCSupport & | accSupport, | ||
| bool | enableLoopConversion = true ) |
Populates patterns for converting orphan ACC operations to host.
All patterns check that the operation is NOT inside or associated with a compute region before converting.
| enableLoopConversion | Whether to convert orphan acc.loop operations. |
Definition at line 360 of file ACCSpecializeForHost.cpp.
References mlir::patterns.
| void mlir::acc::populateACCSpecializeForDevicePatterns | ( | RewritePatternSet & | patterns | ) |
Populates all patterns for device specialization.
In specialized device code (such as specialized acc routine), many ACC operations do not make sense because they are host-side constructs. This function adds patterns to remove or transform them.
Definition at line 124 of file ACCSpecializeForDevice.cpp.
References mlir::patterns.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1014 of file Passes.h.
Referenced by mlir::registerAllPasses().
| mlir::acc::LoopOp mlir::acc::tileACCLoops | ( | llvm::SmallVector< mlir::acc::LoopOp > & | tileLoops, |
| const llvm::SmallVector< mlir::Value > & | tileSizes, | ||
| int32_t | defaultTileSize, | ||
| mlir::RewriterBase & | rewriter ) |
Tile ACC loops according to the given tile sizes.
Tiling a 2-level nested loop will create two 'tile' loops containing two 'element' loops. The transformation looks like:
Before Tiling:
After Tiling:
Unknown tile sizes (represented as -1 in acc dialect for tile(*)) are resolved to the provided default tile size.
| tileLoops | The loops to tile (outermost first). |
| tileSizes | The tile sizes for each dimension. Values of -1 are treated as unknown and resolved to defaultTileSize. |
| defaultTileSize | The default tile size to use for unknown (*) tiles. |
| rewriter | The rewriter to use for modifications. |
Definition at line 136 of file OpenACCUtilsTiling.cpp.
References createInnerLoop(), mlir::RewriterBase::finalizeOpModification(), mlir::Builder::getDenseBoolArrayAttr(), mlir::Builder::getIntegerAttr(), mlir::getType(), moveOpsAndReplaceIVs(), removeWorkerVectorFromLoop(), resolveAndCastTileSize(), mlir::OpBuilder::setInsertionPoint(), and mlir::RewriterBase::startOpModification().
| llvm::SmallVector< mlir::acc::LoopOp > mlir::acc::uncollapseLoops | ( | mlir::acc::LoopOp | origLoop, |
| unsigned | tileCount, | ||
| unsigned | collapseCount, | ||
| mlir::RewriterBase & | rewriter ) |
Uncollapse tile loops with multiple IVs and collapseCount < tileCount.
This is used to prepare loops for tiling when the collapse count is less than the tile count.
| origLoop | The original loop operation to uncollapse. |
| tileCount | The number of tile dimensions. |
| collapseCount | The collapse count from the original loop. |
| rewriter | The rewriter to use for modifications. |
Definition at line 253 of file OpenACCUtilsTiling.cpp.
References createACCLoopFromOriginal(), mlir::OpBuilder::createBlock(), createInnerLoop(), mlir::Builder::getDenseBoolArrayAttr(), moveOpsAndReplaceIVs(), mlir::OpBuilder::setInsertionPoint(), and mlir::OpBuilder::setInsertionPointToEnd().