MLIR
22.0.0git
|
#include "mlir/Dialect/Bufferization/IR/AllocationOpInterface.h"
#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/IR/Operation.h"
#include "mlir/Dialect/Bufferization/Transforms/Passes.h.inc"
Go to the source code of this file.
Namespaces | |
mlir | |
Include the generated interface declarations. | |
mlir::bufferization | |
Macros | |
#define | GEN_PASS_DEF_BUFFERRESULTSTOOUTPARAMSPASS |
Typedefs | |
using | AllocationFn = bufferization::BufferResultsToOutParamsOpts::AllocationFn |
using | MemCpyFn = bufferization::BufferResultsToOutParamsOpts::MemCpyFn |
using | AllocDynamicSizesMap = llvm::DenseMap< func::FuncOp, SmallVector< SmallVector< Value > >> |
Functions | |
static bool | hasFullyDynamicLayoutMap (MemRefType type) |
Return true if the given MemRef type has a fully dynamic layout. More... | |
static bool | hasStaticIdentityLayout (MemRefType type) |
Return true if the given MemRef type has a static identity layout (i.e., no layout). More... | |
static SmallVector< Value > | getDynamicSize (Value memref, func::FuncOp funcOp) |
Return the dynamic shapes of the memref based on the defining op. More... | |
static SmallVector< Value > | mapDynamicSizeAtCaller (func::CallOp call, func::FuncOp callee, ValueRange dynamicSizes) |
Returns the dynamic sizes at the callee, through the call relationship between the caller and callee. More... | |
static LogicalResult | updateFuncOp (func::FuncOp func, SmallVectorImpl< BlockArgument > &appendedEntryArgs, bool addResultAttribute) |
static LogicalResult | updateReturnOps (func::FuncOp func, ArrayRef< BlockArgument > appendedEntryArgs, AllocDynamicSizesMap &map, const bufferization::BufferResultsToOutParamsOpts &options) |
static LogicalResult | updateCalls (ModuleOp module, const AllocDynamicSizesMap &map, const bufferization::BufferResultsToOutParamsOpts &options) |
#define GEN_PASS_DEF_BUFFERRESULTSTOOUTPARAMSPASS |
Definition at line 18 of file BufferResultsToOutParams.cpp.
Definition at line 24 of file BufferResultsToOutParams.cpp.
using AllocDynamicSizesMap = llvm::DenseMap<func::FuncOp, SmallVector<SmallVector<Value> >> |
Definition at line 26 of file BufferResultsToOutParams.cpp.
Definition at line 25 of file BufferResultsToOutParams.cpp.
|
static |
Return the dynamic shapes of the memref
based on the defining op.
If the complete dynamic shape fails to be captured, return an empty value. Currently, only function block arguments are supported for capturing.
Definition at line 51 of file BufferResultsToOutParams.cpp.
References mlir::Value::getDefiningOp(), and mlir::Operation::getOperands().
Referenced by updateReturnOps().
|
static |
Return true
if the given MemRef type has a fully dynamic layout.
Definition at line 30 of file BufferResultsToOutParams.cpp.
References mlir::remark::failed().
Referenced by updateCalls(), and updateFuncOp().
|
static |
Return true
if the given MemRef type has a static identity layout (i.e., no layout).
Definition at line 44 of file BufferResultsToOutParams.cpp.
Referenced by updateCalls(), and updateFuncOp().
|
static |
Returns the dynamic sizes at the callee, through the call relationship between the caller and callee.
Definition at line 75 of file BufferResultsToOutParams.cpp.
Referenced by updateCalls().
|
static |
Definition at line 206 of file BufferResultsToOutParams.cpp.
References mlir::remark::failed(), mlir::get(), mlir::Value::getType(), hasFullyDynamicLayoutMap(), hasStaticIdentityLayout(), mlir::SymbolTable::lookup(), mapDynamicSizeAtCaller(), and options.
Referenced by mlir::bufferization::promoteBufferResultsToOutParams().
|
static |
Definition at line 98 of file BufferResultsToOutParams.cpp.
References mlir::detail::enumerate(), mlir::remark::failed(), mlir::get(), hasFullyDynamicLayoutMap(), and hasStaticIdentityLayout().
Referenced by mlir::bufferization::promoteBufferResultsToOutParams().
|
static |
Definition at line 157 of file BufferResultsToOutParams.cpp.
References mlir::WalkResult::advance(), mlir::remark::failed(), getDynamicSize(), mlir::WalkResult::interrupt(), and options.
Referenced by mlir::bufferization::promoteBufferResultsToOutParams().