MLIR-AIE 1.4.6.dev
AIEBufferAllocation.h File Reference
#include "aie/Dialect/AIE/IR/AIEDialect.h"
#include "aie/Dialect/AIE/IR/AIETargetModel.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/IntEqClasses.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/MathExtras.h"
#include <optional>
#include <string>
#include <utility>
Include dependency graph for AIEBufferAllocation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xilinx::AIE::TileMemoryLimits
 A memtile is reached by DMA rather than by core vector load and store, so its bus width also covers the vector-alignment requirement. More...
struct  xilinx::AIE::BufferAllocation
struct  xilinx::AIE::SpillPool
 A mem tile pool as aie-objectfifo-allocate packs it: count buffers of bytes homed on home, and the DMA ends it has there in its busier direction. More...
class  xilinx::AIE::MemTileSpillSearch
 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...
struct  xilinx::AIE::MemTileSpillSearch::Tile
struct  xilinx::AIE::MemTileSpillSearch::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...
struct  xilinx::AIE::TileLayoutBuffer
 One buffer of a tile, as assign-buffer-addresses lays it out. More...
struct  xilinx::AIE::TileLayoutProblem
 A tile's data memory and what it must hold. More...
struct  xilinx::AIE::TileLayoutStats
 What the searches cost, for –mlir-pass-statistics. More...
struct  xilinx::AIE::TileLayout
 assign-buffer-addresses' layout of one tile, or why there is none. More...

Namespaces

namespace  xilinx
namespace  xilinx::AIE

Functions

TileMemoryLimits xilinx::AIE::tileMemoryLimits (const AIETargetModel &targetModel, AIETileType tileType)
uint32_t xilinx::AIE::requiredBufferAlignBits (uint32_t busAlignBits, uint32_t maxVecAlignBits, int64_t sizeBytes)
 Return the alignment (in bits) a buffer of sizeBytes must satisfy.
template<typename Range, typename BytesFn>
void xilinx::AIE::sortLargestBufferFirst (Range &&buffers, BytesFn bytes)
 Buffers are laid out, and given a tile, largest buffer first: by the address layout below, the objectFIFO allocator, and the SA placer's estimate of it.
int64_t xilinx::AIE::assignSequentialBufferAddresses (llvm::MutableArrayRef< BufferAllocation > buffers, int64_t start=0)
 The basic address allocator and resource planner share this layout: retain address pins, then place unpinned buffers largest-first, aligning each start and skipping occupied ranges.
llvm::SmallVector< unsigned > xilinx::AIE::demandFirstOrder (llvm::ArrayRef< SpillPool > pools)
 aie-objectfifo-allocate's demand-first packing order of pools, given in its size-first order, as indices into them: each home's pools by demand, then buffer size, merged by buffer size, then demand, then home in order of first appearance, so that small pools are not put first over large buffers on unrelated tiles.
llvm::SmallVector< TileID, 2 > xilinx::AIE::memTileSpillNeighbours (const AIETargetModel &target, TileID home)
 The tiles a mem tile buffer homed at home may spill to: those in its row home shares memory with, in column order.
llvm::SmallVector< unsigned > xilinx::AIE::memTileSpillComponents (llvm::ArrayRef< TileID > homes, llvm::function_ref< llvm::SmallVector< TileID, 2 >(TileID)> neighboursOf)
 For each of homes, the index of its component: homes whose buffers may spill to a tile in common, directly or through other homes, share one.
llvm::SmallVector< unsigned > xilinx::AIE::memTileSpillComponents (const AIETargetModel &target, llvm::ArrayRef< TileID > homes)
int64_t xilinx::AIE::bufferAlignBytes (BufferOp buffer, uint32_t tileAlignBitWidth, uint32_t maxVecAlignBits)
 The alignment assign-buffer-addresses places buffer at, in bytes: the vector rule when aligned, and the measured section alignment either way.
TileLayout xilinx::AIE::layoutTile (const TileLayoutProblem &problem, TileLayoutStats &stats)
 Lays out problem as assign-buffer-addresses does, without touching IR.
TileLayoutBuffer xilinx::AIE::tileLayoutBuffer (BufferOp buffer, const TileMemoryLimits &limits)
 What assign-buffer-addresses lays buffer out as, on a tile with limits.
TileLayoutBuffer xilinx::AIE::tileLayoutBuffer (const CoreSectionReservation &held, const TileMemoryLimits &limits)
 What assign-buffer-addresses lays out the buffer it makes for held as, on a core tile with limits.

Variables

constexpr int64_t xilinx::AIE::kDefaultPlacementBudget = 100000
 assign-buffer-addresses' placement-budget unless set.