LLVM 20.0.0git
Classes | Public Member Functions | Public Attributes | List of all members
llvm::TileInfo Struct Reference

A helper struct to create IR loop nests for tiling in IR of the following form: for ColumnLoop.Index = 0..NumColumns for RowLoop.Index = 0..NumRows for KLoop.Index = 0..NumInner. More...

#include "llvm/Transforms/Utils/MatrixUtils.h"

Classes

struct  MatrixLoop
 Properties of a single loop used when generating the tiled loop nest. More...
 

Public Member Functions

 TileInfo (unsigned NumRows, unsigned NumColumns, unsigned NumInner, unsigned TileSize)
 
BasicBlockCreateTiledLoops (BasicBlock *Start, BasicBlock *End, IRBuilderBase &B, DomTreeUpdater &DTU, LoopInfo &LI)
 Creates an IR loop nests for tiling of the form below.
 

Public Attributes

unsigned NumRows
 Number of rows of the matrix.
 
unsigned NumColumns
 Number of columns of the matrix.
 
unsigned NumInner
 Number of columns of the first matrix of a multiply / number of rows of the second matrix of a multiply.
 
unsigned TileSize = -1
 Number of rows/columns in a tile.
 
MatrixLoop RowLoop
 The loop iterating on the rows.
 
MatrixLoop ColumnLoop
 The loop iterating on the columns.
 
MatrixLoop KLoop
 The loop iterating on k (inner dimension).
 

Detailed Description

A helper struct to create IR loop nests for tiling in IR of the following form: for ColumnLoop.Index = 0..NumColumns for RowLoop.Index = 0..NumRows for KLoop.Index = 0..NumInner.

Definition at line 31 of file MatrixUtils.h.

Constructor & Destructor Documentation

◆ TileInfo()

llvm::TileInfo::TileInfo ( unsigned  NumRows,
unsigned  NumColumns,
unsigned  NumInner,
unsigned  TileSize 
)
inline

Definition at line 61 of file MatrixUtils.h.

Member Function Documentation

◆ CreateTiledLoops()

BasicBlock * TileInfo::CreateTiledLoops ( BasicBlock Start,
BasicBlock End,
IRBuilderBase B,
DomTreeUpdater DTU,
LoopInfo LI 
)

Creates an IR loop nests for tiling of the form below.

Returns the block for the inner loop body and sets {Column,Row,Inner}LoopHeader/Latch fields.

for ColumnLoop.Index = 0..NumColumns for RowLoop.Index = 0..NumRows for InnerLoop.Index = 0..NumInner

Definition at line 70 of file MatrixUtils.cpp.

References llvm::LoopBase< BlockT, LoopT >::addChildLoop(), llvm::LoopInfoBase< BlockT, LoopT >::addTopLevelLoop(), llvm::LoopInfoBase< BlockT, LoopT >::AllocateLoop(), B, llvm::BasicBlock::begin(), ColumnLoop, End, llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getSingleSuccessor(), llvm::TileInfo::MatrixLoop::Header, llvm::TileInfo::MatrixLoop::Index, KLoop, llvm::TileInfo::MatrixLoop::Latch, NumColumns, NumInner, NumRows, RowLoop, and TileSize.

Member Data Documentation

◆ ColumnLoop

MatrixLoop llvm::TileInfo::ColumnLoop

The loop iterating on the columns.

Definition at line 57 of file MatrixUtils.h.

Referenced by CreateTiledLoops().

◆ KLoop

MatrixLoop llvm::TileInfo::KLoop

The loop iterating on k (inner dimension).

Definition at line 59 of file MatrixUtils.h.

Referenced by CreateTiledLoops().

◆ NumColumns

unsigned llvm::TileInfo::NumColumns

Number of columns of the matrix.

Definition at line 36 of file MatrixUtils.h.

Referenced by CreateTiledLoops().

◆ NumInner

unsigned llvm::TileInfo::NumInner

Number of columns of the first matrix of a multiply / number of rows of the second matrix of a multiply.

Definition at line 40 of file MatrixUtils.h.

Referenced by CreateTiledLoops().

◆ NumRows

unsigned llvm::TileInfo::NumRows

Number of rows of the matrix.

Definition at line 33 of file MatrixUtils.h.

Referenced by CreateTiledLoops().

◆ RowLoop

MatrixLoop llvm::TileInfo::RowLoop

The loop iterating on the rows.

Definition at line 55 of file MatrixUtils.h.

Referenced by CreateTiledLoops().

◆ TileSize

unsigned llvm::TileInfo::TileSize = -1

Number of rows/columns in a tile.

Definition at line 43 of file MatrixUtils.h.

Referenced by CreateTiledLoops().


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