MLIR  20.0.0git
Namespaces | Macros | Functions
OwnershipBasedBufferDeallocation.cpp File Reference
#include "mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/IR/Iterators.h"
#include "mlir/Interfaces/ControlFlowInterfaces.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_OWNERSHIPBASEDBUFFERDEALLOCATION
 

Functions

static Value buildBoolValue (OpBuilder &builder, Location loc, bool value)
 
static bool isMemref (Value v)
 
static bool hasNeitherAllocateNorFreeSideEffect (Operation *op)
 Return "true" if the given op is guaranteed to have neither "Allocate" nor "Free" side effects. More...
 
static bool hasBufferSemantics (Operation *op)
 Return "true" if the given op has buffer semantics. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_OWNERSHIPBASEDBUFFERDEALLOCATION

#define GEN_PASS_DEF_OWNERSHIPBASEDBUFFERDEALLOCATION

Definition at line 33 of file OwnershipBasedBufferDeallocation.cpp.

Function Documentation

◆ buildBoolValue()

static Value buildBoolValue ( OpBuilder builder,
Location  loc,
bool  value 
)
static

◆ hasBufferSemantics()

static bool hasBufferSemantics ( Operation op)
static

Return "true" if the given op has buffer semantics.

I.e., it has buffer operands, buffer results and/or buffer region entry block arguments.

Definition at line 66 of file OwnershipBasedBufferDeallocation.cpp.

References mlir::Operation::getOperands(), mlir::Operation::getRegions(), mlir::Operation::getResults(), and isMemref().

◆ hasNeitherAllocateNorFreeSideEffect()

static bool hasNeitherAllocateNorFreeSideEffect ( Operation op)
static

Return "true" if the given op is guaranteed to have neither "Allocate" nor "Free" side effects.

Definition at line 53 of file OwnershipBasedBufferDeallocation.cpp.

References mlir::Operation::hasTrait().

◆ isMemref()

static bool isMemref ( Value  v)
static

Definition at line 49 of file OwnershipBasedBufferDeallocation.cpp.

References mlir::Value::getType().

Referenced by hasBufferSemantics().