| 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.
| Namespaces | |
| mlir | |
| Include the generated interface declarations. | |
| mlir::bufferization | |
| Macros | |
| #define | GEN_PASS_DEF_BUFFERDEALLOCATIONSIMPLIFICATIONPASS | 
| Functions | |
| 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.  More... | |
| 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.  More... | |
| static bool | potentiallyAliasesMemref (BufferOriginAnalysis &analysis, ValueRange otherList, Value memref) | 
| Checks if memrefmay potentially alias a MemRef inotherList.  More... | |
| #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 mlir::Value::getDefiningOp(), and 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.
References mlir::Value::getDefiningOp().
Referenced by distinctAllocAndBlockArgument().
| 
 | 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 mlir::remark::analysis(), and distinctAllocAndBlockArgument().
| 
 | static | 
Definition at line 49 of file BufferDeallocationSimplification.cpp.
References mlir::RewriterBase::modifyOpInPlace().