LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions | Variables
CostModel.cpp File Reference
#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"
Include dependency graph for CostModel.cpp:

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< boolEnableReduxCost ("costmodel-reduxcost", cl::init(false), cl::Hidden, cl::desc("Recognize reduction patterns."))
 
static const char cm_name [] = "Cost Model Analysis"
 

Macro Definition Documentation

#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.

Function Documentation

static TargetTransformInfo::OperandValueKind getOperandInfo ( Value V)
static
static std::pair<Value *, ShuffleVectorInst *> getShuffleAndOtherOprd ( BinaryOperator B)
static

Definition at line 279 of file CostModel.cpp.

References llvm::dyn_cast(), and llvm::User::getOperand().

Referenced by matchVectorSplittingReduction().

static bool isReverseVectorMask ( SmallVectorImpl< int > &  Mask)
static
static bool matchMask ( SmallVectorImpl< int > &  M1,
SmallVectorImpl< int > &  M2 
)
static
static bool matchPairwiseReduction ( const ExtractElementInst ReduxRoot,
unsigned Opcode,
Type *&  Ty 
)
static
static bool matchPairwiseReductionAtLevel ( const BinaryOperator BinOp,
unsigned  Level,
unsigned  NumLevels 
)
static
static bool matchPairwiseShuffleMask ( ShuffleVectorInst SI,
bool  IsLeft,
unsigned  Level 
)
static
static bool matchVectorSplittingReduction ( const ExtractElementInst ReduxRoot,
unsigned Opcode,
Type *&  Ty 
)
static

Variable Documentation

const char cm_name[] = "Cost Model Analysis"
static

Definition at line 69 of file CostModel.cpp.

cl::opt<bool> EnableReduxCost("costmodel-reduxcost", cl::init(false), cl::Hidden, cl::desc("Recognize reduction patterns."))
static