MLIR
16.0.0git
|
#include "PassDetail.h"
#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Bufferization/Transforms/AllocTensorElimination.h"
#include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h"
#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/Dominance.h"
#include "mlir/Pass/Pass.h"
Go to the source code of this file.
Functions | |
static bool | neededValuesDominateInsertionPoint (const DominanceInfo &domInfo, Operation *insertionPoint, const SmallVector< Value > &neededValues) |
Return true if all neededValues are in scope at the given insertionPoint . More... | |
static bool | insertionPointDominatesUses (const DominanceInfo &domInfo, Operation *insertionPoint, Operation *allocTensorOp) |
Return true if the given insertionPoint dominates all uses of allocTensorOp . More... | |
static Operation * | findValidInsertionPoint (Operation *allocTensorOp, const SmallVector< Value > &neededValues) |
Find a valid insertion point for a replacement of allocTensorOp , assuming that the replacement may use any value from neededValues . More... | |
|
static |
Find a valid insertion point for a replacement of allocTensorOp
, assuming that the replacement may use any value from neededValues
.
Definition at line 57 of file AllocTensorElimination.cpp.
References insertionPointDominatesUses(), and neededValuesDominateInsertionPoint().
Referenced by mlir::bufferization::eliminateAllocTensors().
|
static |
Return true if the given insertionPoint
dominates all uses of allocTensorOp
.
Definition at line 45 of file AllocTensorElimination.cpp.
References mlir::DominanceInfo::dominates(), and mlir::Operation::getUsers().
Referenced by findValidInsertionPoint().
|
static |
Return true if all neededValues
are in scope at the given insertionPoint
.
Definition at line 26 of file AllocTensorElimination.cpp.
References mlir::DominanceInfo::dominates(), and mlir::Block::findAncestorOpInBlock().
Referenced by findValidInsertionPoint().