MLIR  20.0.0git
Namespaces | Macros | Functions
BufferDeallocation.cpp File Reference
#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
#include "mlir/Dialect/Bufferization/IR/AllocationOpInterface.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Bufferization/Transforms/BufferUtils.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "llvm/ADT/SetOperations.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_BUFFERDEALLOCATION
 

Functions

static LogicalResult walkReturnOperations (Region *region, llvm::function_ref< LogicalResult(RegionBranchTerminatorOpInterface)> func)
 Walks over all immediate return-like terminators in the given region. More...
 
static bool validateSupportedControlFlow (Operation *op)
 Checks if all operations that have at least one attached region implement the RegionBranchOpInterface. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_BUFFERDEALLOCATION

#define GEN_PASS_DEF_BUFFERDEALLOCATION

Definition at line 64 of file BufferDeallocation.cpp.

Function Documentation

◆ validateSupportedControlFlow()

static bool validateSupportedControlFlow ( Operation op)
static

Checks if all operations that have at least one attached region implement the RegionBranchOpInterface.

This is not required in edge cases, where we have a single attached region and the parent operation has no results.

Definition at line 91 of file BufferDeallocation.cpp.

References mlir::WalkResult::advance(), mlir::Operation::getParentOfType(), mlir::Operation::getRegions(), mlir::Operation::getResults(), mlir::Operation::walk(), and mlir::WalkResult::wasSkipped().

Referenced by mlir::bufferization::deallocateBuffers().

◆ walkReturnOperations()

static LogicalResult walkReturnOperations ( Region region,
llvm::function_ref< LogicalResult(RegionBranchTerminatorOpInterface)>  func 
)
static

Walks over all immediate return-like terminators in the given region.

Definition at line 73 of file BufferDeallocation.cpp.