|
LLVM 22.0.0git
|
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) | |
| BasicBlock * | CreateTiledLoops (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). | |
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.
|
inline |
Definition at line 61 of file MatrixUtils.h.
References NumColumns, NumInner, NumRows, and TileSize.
| 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(), ColumnLoop, llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getSingleSuccessor(), KLoop, NumColumns, NumInner, NumRows, RowLoop, and TileSize.
| MatrixLoop llvm::TileInfo::ColumnLoop |
The loop iterating on the columns.
Definition at line 57 of file MatrixUtils.h.
Referenced by CreateTiledLoops().
| MatrixLoop llvm::TileInfo::KLoop |
The loop iterating on k (inner dimension).
Definition at line 59 of file MatrixUtils.h.
Referenced by CreateTiledLoops().
| unsigned llvm::TileInfo::NumColumns |
Number of columns of the matrix.
Definition at line 36 of file MatrixUtils.h.
Referenced by CreateTiledLoops(), and TileInfo().
| 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(), and TileInfo().
| unsigned llvm::TileInfo::NumRows |
Number of rows of the matrix.
Definition at line 33 of file MatrixUtils.h.
Referenced by CreateTiledLoops(), and TileInfo().
| MatrixLoop llvm::TileInfo::RowLoop |
The loop iterating on the rows.
Definition at line 55 of file MatrixUtils.h.
Referenced by CreateTiledLoops().
| unsigned llvm::TileInfo::TileSize = -1 |
Number of rows/columns in a tile.
Definition at line 43 of file MatrixUtils.h.
Referenced by CreateTiledLoops(), and TileInfo().