MLIR  20.0.0git
Classes | Namespaces | Typedefs | Enumerations | Functions
BufferizableOpInterface.h File Reference
#include "mlir/IR/Operation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/DenseMapInfoVariant.h"
#include "llvm/ADT/SetVector.h"
#include <optional>
#include "mlir/Dialect/Bufferization/IR/BufferizationEnums.h.inc"
#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h.inc"

Go to the source code of this file.

Classes

struct  mlir::bufferization::AliasingOpOperand
 A maybe aliasing OpOperand. More...
 
struct  mlir::bufferization::AliasingValue
 A maybe aliasing Value. More...
 
class  mlir::bufferization::AliasList< T >
 
class  mlir::bufferization::OpFilter
 
struct  mlir::bufferization::OpFilter::Entry
 An op filter entry. More...
 
struct  mlir::bufferization::BufferizationOptions
 Options for BufferizableOpInterface-based bufferization. More...
 
struct  mlir::bufferization::TraversalConfig
 Traversal parameters for findValueInReverseUseDefChain. More...
 
class  mlir::bufferization::AnalysisState
 AnalysisState provides a variety of helper functions for dealing with tensor values. More...
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::func
 
 mlir::bufferization
 
 mlir::bufferization::detail
 

Typedefs

using mlir::bufferization::AliasingOpOperandList = AliasList< AliasingOpOperand >
 A list of possible aliasing OpOperands. More...
 
using mlir::bufferization::AliasingValueList = AliasList< AliasingValue >
 A list of possible aliasing Values. More...
 

Enumerations

enum class  mlir::bufferization::BufferRelation { mlir::bufferization::Unknown , mlir::bufferization::Equivalent }
 Specifies a fine-grain relationship between buffers to enable more analysis. More...
 

Functions

FailureOr< Valuemlir::bufferization::allocateTensorForShapedValue (OpBuilder &b, Location loc, Value shapedValue, const BufferizationOptions &options, bool copy=true)
 Create an AllocTensorOp for the given shaped value (memref or tensor). More...
 
FailureOr< Valuemlir::bufferization::getBuffer (RewriterBase &rewriter, Value value, const BufferizationOptions &options)
 Lookup the buffer for the given value. More...
 
FailureOr< BaseMemRefTypemlir::bufferization::getBufferType (Value value, const BufferizationOptions &options)
 Return the buffer type for a given Value (tensor) after bufferization without bufferizing any IR. More...
 
FailureOr< BaseMemRefTypemlir::bufferization::getBufferType (Value value, const BufferizationOptions &options, SmallVector< Value > &invocationStack)
 Return the buffer type for a given Value (tensor) after bufferization without bufferizing any IR. More...
 
bool mlir::bufferization::hasTensorSemantics (Operation *op)
 Return "true" if the given op has tensor semantics and should be bufferized. More...
 
void mlir::bufferization::replaceOpWithBufferizedValues (RewriterBase &rewriter, Operation *op, ValueRange values)
 Replace an op with replacement values. More...
 
template<typename OpTy , typename... Args>
OpTy mlir::bufferization::replaceOpWithNewBufferizedOp (RewriterBase &rewriter, Operation *op, Args &&...args)
 Replace an op with a new op. More...
 
BaseMemRefType mlir::bufferization::getMemRefType (Value value, const BufferizationOptions &options, MemRefLayoutAttrInterface layout={}, Attribute memorySpace=nullptr)
 Return a MemRefType to which the type of the given value can be bufferized. More...
 
BaseMemRefType mlir::bufferization::getMemRefTypeWithFullyDynamicLayout (TensorType tensorType, Attribute memorySpace=nullptr)
 Return a MemRef type with fully dynamic layout. More...
 
BaseMemRefType mlir::bufferization::getMemRefTypeWithStaticIdentityLayout (TensorType tensorType, Attribute memorySpace=nullptr)
 Return a MemRef type with a static identity layout (i.e., no layout map). More...
 
Operationmlir::bufferization::getOwnerOfValue (Value value)
 Return the owner of the given value. More...
 
Regionmlir::bufferization::getNextEnclosingRepetitiveRegion (Region *region, const BufferizationOptions &options)
 Assuming that the given region is repetitive, find the next enclosing repetitive region. More...
 
Regionmlir::bufferization::getParallelRegion (Region *region, const BufferizationOptions &options)
 If region is a parallel region, return region. More...
 
AliasingOpOperandList mlir::bufferization::detail::defaultGetAliasingOpOperands (Value value, const AnalysisState &state)
 This is the default implementation of BufferizableOpInterface::getAliasingOpOperands. More...
 
FailureOr< BaseMemRefTypemlir::bufferization::detail::defaultGetBufferType (Value value, const BufferizationOptions &options, SmallVector< Value > &invocationStack)
 This is the default implementation of BufferizableOpInterface::getBufferType. More...
 
bool mlir::bufferization::detail::defaultResultBufferizesToMemoryWrite (OpResult opResult, const AnalysisState &state)
 This is the default implementation of BufferizableOpInterface::resultBufferizesToMemoryWrite. More...
 
bool mlir::bufferization::detail::defaultIsRepetitiveRegion (BufferizableOpInterface bufferizableOp, unsigned index)
 This is the default implementation of BufferizableOpInterface::isRepetitiveRegion. More...
 
AliasingOpOperandList mlir::bufferization::detail::unknownGetAliasingOpOperands (Value value)
 This is the default implementation of getAliasingOpOperands in case the defining op does not implement the BufferizableOpInterface. More...
 
AliasingValueList mlir::bufferization::detail::unknownGetAliasingValues (OpOperand &opOperand)
 This is the default implementation of getAliasingValues in case the owner op does not implement the BufferizableOpInterface. More...
 
bool mlir::bufferization::detail::defaultHasTensorSemantics (Operation *op)
 This is the default implementation of BufferizableOpInterface::hasTensorSemantics. More...