MLIR 22.0.0git
Utils.h File Reference
#include "mlir/IR/PatternMatch.h"
#include "llvm/ADT/ArrayRef.h"
#include <string>

Go to the source code of this file.

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::func

Functions

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.
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.
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.
FailureOr< FuncOp > mlir::func::lookupFnDecl (SymbolOpInterface symTable, StringRef name, FunctionType funcT, SymbolTableCollection *symbolTables=nullptr)
 Look up a FuncOp with signature resultTypes(paramTypes) and name / name`.