|
MLIR 22.0.0git
|
Namespaces | |
| namespace | arith |
| namespace | impl |
Functions | |
| void | registerAllExtensions (DialectRegistry ®istry) |
| Register all extensions of the func dialect. | |
| void | registerInlinerExtension (DialectRegistry ®istry) |
| Register the extension used to support inlining the func dialect. | |
| void | registerShardingInterfaceExternalModels (DialectRegistry ®istry) |
| void | registerTransformDialectExtension (DialectRegistry ®istry) |
| std::unique_ptr<::mlir::Pass > | createDuplicateFunctionEliminationPass () |
| void | registerDuplicateFunctionEliminationPass () |
| void | registerDuplicateFunctionEliminationPassPass () |
| void | registerFuncPasses () |
| mlir::FailureOr< mlir::func::FuncOp > | replaceFuncWithNewMapping (mlir::RewriterBase &rewriter, mlir::func::FuncOp funcOp, ArrayRef< int > oldArgIdxToNewArgIdx, ArrayRef< int > oldResIdxToNewResIdx) |
| Creates a new function operation with the same name as the original function operation, but with the arguments mapped according to the oldArgToNewArg and oldResToNewRes. | |
| mlir::func::CallOp | replaceCallOpWithNewMapping (mlir::RewriterBase &rewriter, mlir::func::CallOp callOp, ArrayRef< int > oldArgIdxToNewArgIdx, ArrayRef< int > oldResIdxToNewResIdx) |
| Creates a new call operation with the values as the original call operation, but with the arguments mapped according to the oldArgToNewArg and oldResToNewRes. | |
| mlir::FailureOr< std::pair< mlir::func::FuncOp, mlir::func::CallOp > > | deduplicateArgsOfFuncOp (mlir::RewriterBase &rewriter, mlir::func::FuncOp funcOp, mlir::ModuleOp moduleOp) |
| This utility function examines all call operations within the given moduleOp that target the specified funcOp. | |
| FailureOr< FuncOp > | lookupFnDecl (SymbolOpInterface symTable, StringRef name, FunctionType funcT, SymbolTableCollection *symbolTables=nullptr) |
| Look up a FuncOp with signature resultTypes(paramTypes) and name
/ name`. | |
| std::unique_ptr<::mlir::Pass > mlir::func::createDuplicateFunctionEliminationPass | ( | ) |
We declare an explicit private instantiation because Pass classes should only be visible by the current library.
Definition at line 79 of file DuplicateFunctionElimination.cpp.
References mlir::OperationEquivalence::IgnoreLocations, lhs, and rhs.
| mlir::FailureOr< std::pair< mlir::func::FuncOp, mlir::func::CallOp > > mlir::func::deduplicateArgsOfFuncOp | ( | mlir::RewriterBase & | rewriter, |
| mlir::func::FuncOp | funcOp, | ||
| mlir::ModuleOp | moduleOp ) |
This utility function examines all call operations within the given moduleOp that target the specified funcOp.
It identifies duplicate operands in the call operations, creates mappings to deduplicate them, and then applies the transformation to both the function and its call sites. For now, it only supports one call operation for the function operation. The function returns a pair containing the new funcOp and the new callOp. Note: after the transformation, the original funcOp and callOp will be erased.
| FailureOr< func::FuncOp > mlir::func::lookupFnDecl | ( | SymbolOpInterface | symTable, |
| StringRef | name, | ||
| FunctionType | funcT, | ||
| SymbolTableCollection * | symbolTables = nullptr ) |
Look up a FuncOp with signature resultTypes(paramTypes) and name / name`.
Return a failure if the FuncOp is found but with a different signature.
Definition at line 259 of file Utils.cpp.
References mlir::SymbolTable::lookupSymbolIn(), and mlir::SymbolTableCollection::lookupSymbolIn().
Referenced by lookupOrCreateBinaryFn().
| void mlir::func::registerAllExtensions | ( | DialectRegistry & | registry | ) |
Register all extensions of the func dialect.
This should generally only be used by tools, or other use cases that really do want all extensions of the dialect. All other cases should prefer to instead register the specific extensions they intend to take advantage of.
Definition at line 15 of file AllExtensions.cpp.
References registerInlinerExtension(), and registerShardingInterfaceExternalModels().
Referenced by mlir::registerAllExtensions().
|
inline |
|
inline |
|
inline |
Definition at line 115 of file Passes.h.
Referenced by mlir::registerAllPasses().
| void mlir::func::registerInlinerExtension | ( | DialectRegistry & | registry | ) |
Register the extension used to support inlining the func dialect.
Definition at line 87 of file InlinerExtension.cpp.
References mlir::DialectRegistry::addExtension(), and mlir::MLIRContext::getOrLoadDialect().
Referenced by registerAllExtensions().
| void mlir::func::registerShardingInterfaceExternalModels | ( | DialectRegistry & | registry | ) |
Definition at line 16 of file ShardingExtensions.cpp.
References mlir::DialectRegistry::addExtension().
Referenced by registerAllExtensions().
| void mlir::func::registerTransformDialectExtension | ( | DialectRegistry & | registry | ) |
Definition at line 412 of file FuncTransformOps.cpp.
References mlir::DialectRegistry::addExtensions().
Referenced by mlir::registerAllExtensions().
| mlir::func::CallOp mlir::func::replaceCallOpWithNewMapping | ( | mlir::RewriterBase & | rewriter, |
| mlir::func::CallOp | callOp, | ||
| ArrayRef< int > | oldArgIdxToNewArgIdx, | ||
| ArrayRef< int > | oldResIdxToNewResIdx ) |
Creates a new call operation with the values as the original call operation, but with the arguments mapped according to the oldArgToNewArg and oldResToNewRes.
Note: the method asserts that the oldArgToNewArg and oldResToNewRes maps the whole call operation arguments and results.
| mlir::FailureOr< mlir::func::FuncOp > mlir::func::replaceFuncWithNewMapping | ( | mlir::RewriterBase & | rewriter, |
| mlir::func::FuncOp | funcOp, | ||
| ArrayRef< int > | oldArgIdxToNewArgIdx, | ||
| ArrayRef< int > | oldResIdxToNewResIdx ) |
Creates a new function operation with the same name as the original function operation, but with the arguments mapped according to the oldArgToNewArg and oldResToNewRes.
The funcOp operation must have exactly one block. Returns the new function operation or failure if funcOp doesn't have exactly one block. Note: the method asserts that the oldArgToNewArg and oldResToNewRes maps the whole function arguments and results.