LLVM API Documentation
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Macros | |
#define | CM_NAME "cost-model" |
#define | DEBUG_TYPE CM_NAME |
Functions | |
static bool | isReverseVectorMask (SmallVectorImpl< int > &Mask) |
static TargetTransformInfo::OperandValueKind | getOperandInfo (Value *V) |
static bool | matchMask (SmallVectorImpl< int > &M1, SmallVectorImpl< int > &M2) |
static bool | matchPairwiseShuffleMask (ShuffleVectorInst *SI, bool IsLeft, unsigned Level) |
static bool | matchPairwiseReductionAtLevel (const BinaryOperator *BinOp, unsigned Level, unsigned NumLevels) |
static bool | matchPairwiseReduction (const ExtractElementInst *ReduxRoot, unsigned &Opcode, Type *&Ty) |
static std::pair< Value *, ShuffleVectorInst * > | getShuffleAndOtherOprd (BinaryOperator *B) |
static bool | matchVectorSplittingReduction (const ExtractElementInst *ReduxRoot, unsigned &Opcode, Type *&Ty) |
Variables | |
static cl::opt< bool > | EnableReduxCost ("costmodel-reduxcost", cl::init(false), cl::Hidden, cl::desc("Recognize reduction patterns.")) |
static const char | cm_name [] = "Cost Model Analysis" |
#define CM_NAME "cost-model" |
Definition at line 20 of file CostModel.cpp.
#define DEBUG_TYPE CM_NAME |
Definition at line 21 of file CostModel.cpp.
|
static |
Definition at line 97 of file CostModel.cpp.
References llvm::ConstantVector::getSplatValue(), llvm::ConstantDataVector::getSplatValue(), llvm::TargetTransformInfo::OK_AnyValue, and llvm::TargetTransformInfo::OK_UniformConstantValue.
|
static |
Definition at line 279 of file CostModel.cpp.
References llvm::dyn_cast(), and llvm::User::getOperand().
Referenced by matchVectorSplittingReduction().
|
static |
Definition at line 90 of file CostModel.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::size().
|
static |
Definition at line 114 of file CostModel.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by matchPairwiseShuffleMask(), and matchVectorSplittingReduction().
|
static |
Definition at line 229 of file CostModel.cpp.
References llvm::dyn_cast(), EnableReduxCost, llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::getVectorNumElements(), llvm::ConstantInt::getZExtValue(), llvm::isPowerOf2_32(), llvm::Log2_32(), and matchPairwiseReductionAtLevel().
|
static |
Definition at line 148 of file CostModel.cpp.
References llvm::dyn_cast(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::isVectorTy(), llvm::A64CC::LS, and matchPairwiseShuffleMask().
Referenced by matchPairwiseReduction().
|
static |
Definition at line 125 of file CostModel.cpp.
References llvm::ShuffleVectorInst::getShuffleMask(), llvm::ShuffleVectorInst::getType(), llvm::Type::getVectorNumElements(), and matchMask().
Referenced by matchPairwiseReductionAtLevel().
|
static |
Definition at line 292 of file CostModel.cpp.
References llvm::dyn_cast(), EnableReduxCost, llvm::SmallVectorTemplateCommon< T >::end(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), getShuffleAndOtherOprd(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::Value::getType(), llvm::Type::getVectorNumElements(), llvm::ConstantInt::getZExtValue(), llvm::isPowerOf2_32(), matchMask(), and llvm::tie().
|
static |
Definition at line 69 of file CostModel.cpp.
|
static |
Referenced by matchPairwiseReduction(), and matchVectorSplittingReduction().