MLIR 22.0.0git
DropEquivalentBufferResults.cpp File Reference
#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/Bufferization/Transforms/Passes.h.inc"

Go to the source code of this file.

Classes

class  mlir::bufferization::impl::DropEquivalentBufferResultsPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::bufferization
namespace  mlir::bufferization::impl

Macros

#define GEN_PASS_DEF_DROPEQUIVALENTBUFFERRESULTSPASS

Functions

std::unique_ptr<::mlir::Passmlir::bufferization::impl::createDropEquivalentBufferResultsPass ()
std::unique_ptr<::mlir::Passmlir::bufferization::createDropEquivalentBufferResultsPass ()
static SmallVector< func::ReturnOp > getReturnOps (func::FuncOp funcOp)
 Get all the ReturnOp in the funcOp.
static SmallVector< ValuegetReturnOpsOperandInPos (ArrayRef< func::ReturnOp > returnOps, size_t pos)
 Get the operands at the specified position for all returnOps.
static bool operandsEqualFuncArgument (ArrayRef< Value > operands, BlockArgument argument)
 Check if all given values are the same buffer as the block argument (modulo cast ops).

Macro Definition Documentation

◆ GEN_PASS_DEF_DROPEQUIVALENTBUFFERRESULTSPASS

#define GEN_PASS_DEF_DROPEQUIVALENTBUFFERRESULTSPASS

Definition at line 37 of file DropEquivalentBufferResults.cpp.

Function Documentation

◆ getReturnOps()

SmallVector< func::ReturnOp > getReturnOps ( func::FuncOp funcOp)
static

Get all the ReturnOp in the funcOp.

Definition at line 45 of file DropEquivalentBufferResults.cpp.

References b.

◆ getReturnOpsOperandInPos()

SmallVector< Value > getReturnOpsOperandInPos ( ArrayRef< func::ReturnOp > returnOps,
size_t pos )
static

Get the operands at the specified position for all returnOps.

Definition at line 57 of file DropEquivalentBufferResults.cpp.

◆ operandsEqualFuncArgument()

bool operandsEqualFuncArgument ( ArrayRef< Value > operands,
BlockArgument argument )
static

Check if all given values are the same buffer as the block argument (modulo cast ops).

Definition at line 65 of file DropEquivalentBufferResults.cpp.