|
MLIR 22.0.0git
|
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"#include "mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.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/Matchers.h"#include "mlir/Transforms/GreedyPatternRewriteDriver.h"#include "mlir/Dialect/Bufferization/Transforms/Passes.h.inc"Go to the source code of this file.
Classes | |
| class | mlir::bufferization::impl::BufferDeallocationSimplificationPassBase< DerivedT > |
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
| namespace | mlir::bufferization |
| namespace | mlir::bufferization::impl |
Macros | |
| #define | GEN_PASS_DEF_BUFFERDEALLOCATIONSIMPLIFICATIONPASS |
Functions | |
| std::unique_ptr<::mlir::Pass > | mlir::bufferization::impl::createBufferDeallocationSimplificationPass () |
| std::unique_ptr<::mlir::Pass > | mlir::bufferization::createBufferDeallocationSimplificationPass () |
| static Value | getViewBase (Value value) |
| Given a memref value, return the "base" value by skipping over all ViewLikeOpInterface ops (if any) in the reverse use-def chain. | |
| static LogicalResult | updateDeallocIfChanged (DeallocOp deallocOp, ValueRange memrefs, ValueRange conditions, PatternRewriter &rewriter) |
| static bool | distinctAllocAndBlockArgument (Value v1, Value v2) |
| Return "true" if the given values are guaranteed to be different (and non-aliasing) allocations based on the fact that one value is the result of an allocation and the other value is a block argument of a parent block. | |
| static bool | potentiallyAliasesMemref (BufferOriginAnalysis &analysis, ValueRange otherList, Value memref) |
| Checks if memref may potentially alias a MemRef in otherList. | |
| #define GEN_PASS_DEF_BUFFERDEALLOCATIONSIMPLIFICATIONPASS |
Definition at line 25 of file BufferDeallocationSimplification.cpp.
Return "true" if the given values are guaranteed to be different (and non-aliasing) allocations based on the fact that one value is the result of an allocation and the other value is a block argument of a parent block.
Note: This is a best-effort analysis that will eventually be replaced by a proper "is same allocation" analysis. This function may return "false" even though the two values are distinct allocations.
Definition at line 70 of file BufferDeallocationSimplification.cpp.
References getViewBase().
Referenced by potentiallyAliasesMemref().
Given a memref value, return the "base" value by skipping over all ViewLikeOpInterface ops (if any) in the reverse use-def chain.
Definition at line 39 of file BufferDeallocationSimplification.cpp.
Referenced by distinctAllocAndBlockArgument(), and mlir::BufferOriginAnalysis::isSameAllocation().
|
static |
Checks if memref may potentially alias a MemRef in otherList.
It is often a requirement of optimization patterns that there cannot be any aliasing memref in order to perform the desired simplification.
Definition at line 87 of file BufferDeallocationSimplification.cpp.
References distinctAllocAndBlockArgument().
|
static |
Definition at line 49 of file BufferDeallocationSimplification.cpp.