MLIR  16.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlir::bufferization::BufferPlacementAllocs Class Reference

A simple analysis that detects allocation operations. More...

#include "mlir/Dialect/Bufferization/Transforms/BufferUtils.h"

Public Types

using AllocEntry = std::tuple< Value, Operation * >
 Represents a tuple of allocValue and deallocOperation. More...
 
using AllocEntryList = SmallVector< AllocEntry, 8 >
 Represents a list containing all alloc entries. More...
 

Public Member Functions

 BufferPlacementAllocs (Operation *op)
 Initializes the internal list by discovering all supported allocation nodes. More...
 
AllocEntryList::const_iterator begin () const
 Returns the begin iterator to iterate over all allocations. More...
 
AllocEntryList::const_iterator end () const
 Returns the end iterator that can be used in combination with begin. More...
 
AllocEntryList::iterator begin ()
 Returns the begin iterator to iterate over all allocations. More...
 
AllocEntryList::iterator end ()
 Returns the end iterator that can be used in combination with begin. More...
 
void registerAlloc (const AllocEntry &entry)
 Registers a new allocation entry. More...
 

Static Public Member Functions

static OperationgetStartOperation (Value allocValue, Block *placementBlock, const Liveness &liveness)
 Get the start operation to place the given alloc value within the specified placement block. More...
 

Detailed Description

A simple analysis that detects allocation operations.

Definition at line 34 of file BufferUtils.h.

Member Typedef Documentation

◆ AllocEntry

Represents a tuple of allocValue and deallocOperation.

Definition at line 37 of file BufferUtils.h.

◆ AllocEntryList

Represents a list containing all alloc entries.

Definition at line 40 of file BufferUtils.h.

Constructor & Destructor Documentation

◆ BufferPlacementAllocs()

BufferPlacementAllocs::BufferPlacementAllocs ( Operation op)

Member Function Documentation

◆ begin() [1/2]

AllocEntryList::const_iterator mlir::bufferization::BufferPlacementAllocs::begin ( ) const
inline

Returns the begin iterator to iterate over all allocations.

Definition at line 53 of file BufferUtils.h.

◆ begin() [2/2]

AllocEntryList::iterator mlir::bufferization::BufferPlacementAllocs::begin ( )
inline

Returns the begin iterator to iterate over all allocations.

Definition at line 59 of file BufferUtils.h.

◆ end() [1/2]

AllocEntryList::const_iterator mlir::bufferization::BufferPlacementAllocs::end ( ) const
inline

Returns the end iterator that can be used in combination with begin.

Definition at line 56 of file BufferUtils.h.

◆ end() [2/2]

AllocEntryList::iterator mlir::bufferization::BufferPlacementAllocs::end ( )
inline

Returns the end iterator that can be used in combination with begin.

Definition at line 62 of file BufferUtils.h.

◆ getStartOperation()

Operation * BufferPlacementAllocs::getStartOperation ( Value  allocValue,
Block placementBlock,
const Liveness liveness 
)
static

Get the start operation to place the given alloc value within the specified placement block.

Get the start operation to place the given alloc value withing the.

Definition at line 33 of file BufferUtils.cpp.

References mlir::Block::findAncestorOpInBlock(), mlir::Operation::getBlock(), mlir::Liveness::getLiveness(), mlir::LivenessBlockInfo::getStartOperation(), and mlir::Block::getTerminator().

Referenced by hasAllocationScope().

◆ registerAlloc()

void mlir::bufferization::BufferPlacementAllocs::registerAlloc ( const AllocEntry entry)
inline

Registers a new allocation entry.

Definition at line 65 of file BufferUtils.h.


The documentation for this class was generated from the following files: