Go to the source code of this file.
|
static DISubprogram * | getSubprogram (DIScope *Scope) |
| Helper function to either return Scope, if it is a subprogram or the attached subprogram for a local scope.
|
|
static void | eraseFromParentAndMove (Value *V, BasicBlock::reverse_iterator &II, BasicBlock &BB) |
| Erase V from BB and move \II forward to avoid invalidating iterators.
|
|
static bool | isSplat (Value *V) |
| Return true if V is a splat of a value (which is used when multiplying a matrix with a scalar).
|
|
template<typename LTy , typename RTy > |
auto | m_AnyMul (const LTy &L, const RTy &R) |
| Match any mul operation (fp or integer).
|
|
template<typename LTy , typename RTy > |
auto | m_AnyAdd (const LTy &L, const RTy &R) |
| Match any add operation (fp or integer).
|
|
| INITIALIZE_PASS_BEGIN (LowerMatrixIntrinsicsLegacyPass, DEBUG_TYPE, pass_name, false, false) INITIALIZE_PASS_END(LowerMatrixIntrinsicsLegacyPass |
|
| INITIALIZE_PASS_BEGIN (LowerMatrixIntrinsicsMinimalLegacyPass, "lower-matrix-intrinsics-minimal", pass_name_minimal, false, false) INITIALIZE_PASS_END(LowerMatrixIntrinsicsMinimalLegacyPass |
|
|
static cl::opt< bool > | FuseMatrix ("fuse-matrix", cl::init(true), cl::Hidden, cl::desc("Enable/disable fusing matrix instructions.")) |
|
static cl::opt< unsigned > | TileSize ("fuse-matrix-tile-size", cl::init(4), cl::Hidden, cl::desc("Tile size for matrix instruction fusion using square-shaped tiles.")) |
|
static cl::opt< bool > | TileUseLoops ("fuse-matrix-use-loops", cl::init(false), cl::Hidden, cl::desc("Generate loop nest for tiling.")) |
|
static cl::opt< bool > | ForceFusion ("force-fuse-matrix", cl::init(false), cl::Hidden, cl::desc("Force matrix instruction fusion even if not profitable.")) |
|
static cl::opt< bool > | AllowContractEnabled ("matrix-allow-contract", cl::init(false), cl::Hidden, cl::desc("Allow the use of FMAs if available and profitable. This may " "result in different results, due to less rounding error.")) |
|
static cl::opt< MatrixLayoutTy > | MatrixLayout ("matrix-default-layout", cl::init(MatrixLayoutTy::ColumnMajor), cl::desc("Sets the default matrix layout"), cl::values(clEnumValN(MatrixLayoutTy::ColumnMajor, "column-major", "Use column-major layout"), clEnumValN(MatrixLayoutTy::RowMajor, "row-major", "Use row-major layout"))) |
|
static cl::opt< bool > | PrintAfterTransposeOpt ("matrix-print-after-transpose-opt", cl::init(false)) |
|
static const char | pass_name [] = "Lower the matrix intrinsics" |
|
| DEBUG_TYPE |
|
| false |
|
static const char | pass_name_minimal [] = "Lower the matrix intrinsics (minimal)" |
|
lower matrix intrinsics | minimal |
|
◆ DEBUG_TYPE
#define DEBUG_TYPE "lower-matrix-intrinsics" |
◆ MatrixLayoutTy
◆ eraseFromParentAndMove()
◆ getSubprogram()
◆ INITIALIZE_PASS_BEGIN() [1/2]
INITIALIZE_PASS_BEGIN |
( |
LowerMatrixIntrinsicsLegacyPass |
, |
|
|
DEBUG_TYPE |
, |
|
|
pass_name |
, |
|
|
false |
, |
|
|
false |
|
|
) |
| |
◆ INITIALIZE_PASS_BEGIN() [2/2]
INITIALIZE_PASS_BEGIN |
( |
LowerMatrixIntrinsicsMinimalLegacyPass |
, |
|
|
"lower-matrix-intrinsics-minimal" |
, |
|
|
pass_name_minimal |
, |
|
|
false |
, |
|
|
false |
|
|
) |
| |
◆ isSplat()
◆ m_AnyAdd()
template<typename LTy , typename RTy >
◆ m_AnyMul()
template<typename LTy , typename RTy >
◆ AllowContractEnabled
cl::opt< bool > AllowContractEnabled("matrix-allow-contract", cl::init(false), cl::Hidden, cl::desc("Allow the use of FMAs if available and profitable. This may " "result in different results, due to less rounding error.")) |
( |
"matrix-allow-contract" |
, |
|
|
cl::init(false) |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("Allow the use of FMAs if available and profitable. This may " "result in different results, due to less rounding error.") |
|
|
) |
| |
|
static |
◆ DEBUG_TYPE
◆ false
◆ ForceFusion
cl::opt< bool > ForceFusion("force-fuse-matrix", cl::init(false), cl::Hidden, cl::desc("Force matrix instruction fusion even if not profitable.")) |
( |
"force-fuse-matrix" |
, |
|
|
cl::init(false) |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("Force matrix instruction fusion even if not profitable.") |
|
|
) |
| |
|
static |
◆ FuseMatrix
cl::opt< bool > FuseMatrix("fuse-matrix", cl::init(true), cl::Hidden, cl::desc("Enable/disable fusing matrix instructions.")) |
( |
"fuse-matrix" |
, |
|
|
cl::init(true) |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("Enable/disable fusing matrix instructions.") |
|
|
) |
| |
|
static |
◆ MatrixLayout
cl::opt< MatrixLayoutTy > MatrixLayout("matrix-default-layout", cl::init(MatrixLayoutTy::ColumnMajor), cl::desc("Sets the default matrix layout"), cl::values(clEnumValN(MatrixLayoutTy::ColumnMajor, "column-major", "Use column-major layout"), clEnumValN(MatrixLayoutTy::RowMajor, "row-major", "Use row-major layout"))) |
( |
"matrix-default-layout" |
, |
|
|
cl::init(MatrixLayoutTy::ColumnMajor) |
, |
|
|
cl::desc("Sets the default matrix layout") |
, |
|
|
cl::values(clEnumValN(MatrixLayoutTy::ColumnMajor, "column-major", "Use column-major layout"), clEnumValN(MatrixLayoutTy::RowMajor, "row-major", "Use row-major layout")) |
|
|
) |
| |
|
static |
◆ minimal
◆ pass_name
pass_name = "Lower the matrix intrinsics" |
|
static |
◆ pass_name_minimal
◆ PrintAfterTransposeOpt
cl::opt< bool > PrintAfterTransposeOpt("matrix-print-after-transpose-opt", cl::init(false)) |
( |
"matrix-print-after-transpose-opt" |
, |
|
|
cl::init(false) |
|
|
) |
| |
|
static |
◆ TileSize
cl::opt< unsigned > TileSize("fuse-matrix-tile-size", cl::init(4), cl::Hidden, cl::desc( "Tile size for matrix instruction fusion using square-shaped tiles.")) |
( |
"fuse-matrix-tile-size" |
, |
|
|
cl::init(4) |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc( "Tile size for matrix instruction fusion using square-shaped tiles.") |
|
|
) |
| |
|
static |
◆ TileUseLoops
cl::opt< bool > TileUseLoops("fuse-matrix-use-loops", cl::init(false), cl::Hidden, cl::desc("Generate loop nest for tiling.")) |
( |
"fuse-matrix-use-loops" |
, |
|
|
cl::init(false) |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("Generate loop nest for tiling.") |
|
|
) |
| |
|
static |