MLIR
17.0.0git
|
#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
#include "mlir/Dialect/Bufferization/Transforms/BufferUtils.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/IR/Operation.h"
#include "mlir/Interfaces/LoopLikeInterface.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Dialect/Bufferization/Transforms/Passes.h.inc"
Go to the source code of this file.
Namespaces | |
mlir | |
This header declares functions that assist transformations in the MemRef dialect. | |
mlir::bufferization | |
Macros | |
#define | GEN_PASS_DEF_BUFFERHOISTING |
#define | GEN_PASS_DEF_BUFFERLOOPHOISTING |
#define | GEN_PASS_DEF_PROMOTEBUFFERSTOSTACK |
Functions | |
static bool | isKnownControlFlowInterface (Operation *op) |
Returns true if the given operation implements a known high-level region- based control-flow interface. More... | |
static bool | defaultIsSmallAlloc (Value alloc, unsigned maximumSizeInBytes, unsigned maxRankOfAllocatedMemRef) |
Check if the size of the allocation is less than the given size. More... | |
static bool | leavesAllocationScope (Region *parentRegion, const BufferViewFlowAnalysis::ValueSetT &aliases) |
Checks whether the given aliases leave the allocation scope. More... | |
static bool | hasAllocationScope (Value alloc, const BufferViewFlowAnalysis &aliasAnalysis) |
Checks, if an automated allocation scope for a given alloc value exists. More... | |
#define GEN_PASS_DEF_BUFFERHOISTING |
Definition at line 25 of file BufferOptimizations.cpp.
#define GEN_PASS_DEF_BUFFERLOOPHOISTING |
Definition at line 26 of file BufferOptimizations.cpp.
#define GEN_PASS_DEF_PROMOTEBUFFERSTOSTACK |
Definition at line 27 of file BufferOptimizations.cpp.
|
static |
Check if the size of the allocation is less than the given size.
The transformation is only applied to small buffers since large buffers could exceed the stack space.
Definition at line 44 of file BufferOptimizations.cpp.
References mlir::DataLayout::closest(), mlir::Value::getDefiningOp(), mlir::Operation::getOperands(), mlir::Value::getType(), and mlir::DataLayout::getTypeSizeInBits().
|
static |
Checks, if an automated allocation scope for a given alloc value exists.
Definition at line 85 of file BufferOptimizations.cpp.
References mlir::Region::getParentOp(), mlir::Region::getParentRegion(), mlir::Value::getParentRegion(), isKnownControlFlowInterface(), mlir::bufferization::BufferPlacementTransformationBase::isLoop(), leavesAllocationScope(), and mlir::BufferViewFlowAnalysis::resolve().
|
static |
Returns true if the given operation implements a known high-level region- based control-flow interface.
Definition at line 37 of file BufferOptimizations.cpp.
Referenced by hasAllocationScope().
|
static |
Checks whether the given aliases leave the allocation scope.
Definition at line 70 of file BufferOptimizations.cpp.
References mlir::isRegionReturnLike().
Referenced by hasAllocationScope().