MLIR-AIE 1.4.6.dev
xilinx::AIE::MemTileSpillSearch Class Reference

The mem tiles a mem tile pool's buffers go to: aie-objectfifo-allocate places them by this search, and the SA placer runs it on each placement it weighs. More...

#include "aie/Dialect/AIE/Transforms/AIEBufferAllocation.h"

Collaboration diagram for xilinx::AIE::MemTileSpillSearch:

Classes

struct  Tile
struct  Buffer
 A buffer of bytes homed on home, which it may take unless atHome is false, and the neighbours it may spill to, in the order tried when they are equally used. More...

Public Member Functions

 MemTileSpillSearch (llvm::SmallVector< Tile > tiles, int64_t alignment)
int64_t used (unsigned tile, int64_t bytes=0, int count=0) const
 The bytes tile spans with what it holds and count more of bytes.
bool fits (unsigned tile, int64_t bytes, int count=1) const
void reserve (unsigned tile, int64_t bytes, int count=1)
bool place (llvm::ArrayRef< Buffer > buffers)
 Places buffers in order on top of what the tiles hold.

Public Attributes

llvm::SmallVector< unsigned > chosen
size_t failed = 0
int64_t unplacedBytes = 0
llvm::SmallVector< bool > weighed
 Homes a spill from was weighed: aie-objectfifo-allocate gives their neighbours tile ops, as later passes may use them.

Static Public Attributes

static constexpr int kRetries = 256
 Alternatives the search tries before it gives up.

Detailed Description

The mem tiles a mem tile pool's buffers go to: aie-objectfifo-allocate places them by this search, and the SA placer runs it on each placement it weighs.

A tile's use is its layout by assignSequentialBufferAddresses. Each buffer in turn goes home when it fits there, else to a neighbour home shares memory with, least used first; when one fits nowhere, earlier choices are revisited, latest first, until kRetries alternatives have been tried.

Definition at line 227 of file AIEBufferAllocation.h.

Constructor & Destructor Documentation

◆ MemTileSpillSearch()

xilinx::AIE::MemTileSpillSearch::MemTileSpillSearch ( llvm::SmallVector< Tile > tiles,
int64_t alignment )
inline

Definition at line 249 of file AIEBufferAllocation.h.

References xilinx::AIE::BufferAllocation::size, and weighed.

Member Function Documentation

◆ fits()

bool xilinx::AIE::MemTileSpillSearch::fits ( unsigned tile,
int64_t bytes,
int count = 1 ) const
inline

Definition at line 281 of file AIEBufferAllocation.h.

References used().

◆ place()

bool xilinx::AIE::MemTileSpillSearch::place ( llvm::ArrayRef< Buffer > buffers)
inline

Places buffers in order on top of what the tiles hold.

On success each buffer's tile is in chosen; otherwise failed is the buffer that fit nowhere with the most buffers left after it, and unplacedBytes the bytes of it and those. Buffers whose tiles reach no tile in common place independently, so each such component is searched on its own, with its own kRetries.

Definition at line 298 of file AIEBufferAllocation.h.

References chosen, failed, kRetries, and unplacedBytes.

◆ reserve()

void xilinx::AIE::MemTileSpillSearch::reserve ( unsigned tile,
int64_t bytes,
int count = 1 )
inline

Definition at line 284 of file AIEBufferAllocation.h.

◆ used()

int64_t xilinx::AIE::MemTileSpillSearch::used ( unsigned tile,
int64_t bytes = 0,
int count = 0 ) const
inline

The bytes tile spans with what it holds and count more of bytes.

Definition at line 268 of file AIEBufferAllocation.h.

References xilinx::AIE::assignSequentialBufferAddresses().

Referenced by fits().

Member Data Documentation

◆ chosen

llvm::SmallVector<unsigned> xilinx::AIE::MemTileSpillSearch::chosen

Definition at line 336 of file AIEBufferAllocation.h.

Referenced by place().

◆ failed

size_t xilinx::AIE::MemTileSpillSearch::failed = 0

Definition at line 337 of file AIEBufferAllocation.h.

Referenced by place().

◆ kRetries

int xilinx::AIE::MemTileSpillSearch::kRetries = 256
staticconstexpr

Alternatives the search tries before it gives up.

Definition at line 290 of file AIEBufferAllocation.h.

Referenced by place().

◆ unplacedBytes

int64_t xilinx::AIE::MemTileSpillSearch::unplacedBytes = 0

Definition at line 338 of file AIEBufferAllocation.h.

Referenced by place().

◆ weighed

llvm::SmallVector<bool> xilinx::AIE::MemTileSpillSearch::weighed

Homes a spill from was weighed: aie-objectfifo-allocate gives their neighbours tile ops, as later passes may use them.

Definition at line 341 of file AIEBufferAllocation.h.

Referenced by MemTileSpillSearch().


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