LLVM 20.0.0git
|
#include "llvm/Transforms/Scalar/LowerMatrixIntrinsics.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/MatrixBuilder.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Utils/MatrixUtils.h"
#include <cmath>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "lower-matrix-intrinsics" |
Enumerations | |
enum class | MatrixLayoutTy { ColumnMajor , RowMajor } |
Functions | |
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 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). | |
Variables | |
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< bool > | VerifyShapeInfo ("verify-matrix-shapes", cl::Hidden, cl::desc("Enable/disable matrix shape verification."), cl::init(false)) |
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)) |
#define DEBUG_TYPE "lower-matrix-intrinsics" |
Definition at line 53 of file LowerMatrixIntrinsics.cpp.
|
strong |
Enumerator | |
---|---|
ColumnMajor | |
RowMajor |
Definition at line 79 of file LowerMatrixIntrinsics.cpp.
|
static |
Helper function to either return Scope, if it is a subprogram or the attached subprogram for a local scope.
Definition at line 94 of file LowerMatrixIntrinsics.cpp.
References llvm::DILocalScope::getSubprogram().
Return true if V is a splat of a value (which is used when multiplying a matrix with a scalar).
Definition at line 102 of file LowerMatrixIntrinsics.cpp.
Referenced by llvm::PPC::get_VSPLTI_elt(), llvm::DOTGraphTraits< BoUpSLP * >::getNodeLabel(), llvm::slpvectorizer::BoUpSLP::getReorderingData(), llvm::slpvectorizer::BoUpSLP::isTreeNotExtendable(), llvm::slpvectorizer::BoUpSLP::isTreeTinyAndNotFullyVectorizable(), llvm::slpvectorizer::BoUpSLP::transformNodes(), and llvm::InstCombinerImpl::visitShuffleVectorInst().
Match any add operation (fp or integer).
Definition at line 116 of file LowerMatrixIntrinsics.cpp.
References llvm::PatternMatch::m_Add(), llvm::PatternMatch::m_CombineOr(), and llvm::PatternMatch::m_FAdd().
Match any mul operation (fp or integer).
Definition at line 110 of file LowerMatrixIntrinsics.cpp.
References llvm::PatternMatch::m_CombineOr(), llvm::PatternMatch::m_FMul(), and llvm::PatternMatch::m_Mul().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Referenced by llvm::OpenMPIRBuilder::tileLoops().
|
static |