LLVM  9.0.0svn
Macros | Enumerations | Functions | Variables
TargetTransformInfo.cpp File Reference
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/TargetTransformInfoImpl.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include <utility>
Include dependency graph for TargetTransformInfo.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "tti"
 

Enumerations

enum  ReductionKind
 Kind of the reduction data. More...
 

Functions

static bool matchPairwiseShuffleMask (ShuffleVectorInst *SI, bool IsLeft, unsigned Level)
 
static Optional< ReductionData > getReductionData (Instruction *I)
 
static ReductionKind matchPairwiseReductionAtLevel (Instruction *I, unsigned Level, unsigned NumLevels)
 
static ReductionKind matchPairwiseReduction (const ExtractElementInst *ReduxRoot, unsigned &Opcode, Type *&Ty)
 
static std::pair< Value *, ShuffleVectorInst * > getShuffleAndOtherOprd (Value *L, Value *R)
 
static ReductionKind 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."))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "tti"

Definition at line 26 of file TargetTransformInfo.cpp.

Enumeration Type Documentation

◆ ReductionKind

Kind of the reduction data.

Definition at line 731 of file TargetTransformInfo.cpp.

Function Documentation

◆ getReductionData()

static Optional<ReductionData> getReductionData ( Instruction I)
static

◆ getShuffleAndOtherOprd()

static std::pair<Value *, ShuffleVectorInst *> getShuffleAndOtherOprd ( Value L,
Value R 
)
static

Definition at line 914 of file TargetTransformInfo.cpp.

References llvm::dyn_cast().

Referenced by matchVectorSplittingReduction().

◆ matchPairwiseReduction()

static ReductionKind matchPairwiseReduction ( const ExtractElementInst ReduxRoot,
unsigned Opcode,
Type *&  Ty 
)
static

◆ matchPairwiseReductionAtLevel()

static ReductionKind matchPairwiseReductionAtLevel ( Instruction I,
unsigned  Level,
unsigned  NumLevels 
)
static

◆ matchPairwiseShuffleMask()

static bool matchPairwiseShuffleMask ( ShuffleVectorInst SI,
bool  IsLeft,
unsigned  Level 
)
static

◆ matchVectorSplittingReduction()

static ReductionKind matchVectorSplittingReduction ( const ExtractElementInst ReduxRoot,
unsigned Opcode,
Type *&  Ty 
)
static

Definition at line 925 of file TargetTransformInfo.cpp.

References llvm::MCID::Add, llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::MCID::Call, llvm::ShuffleVectorInst::changesLength(), llvm::dyn_cast(), EnableReduxCost, llvm::SmallVectorTemplateCommon< T >::end(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::TargetTransformInfo::getArithmeticInstrCost(), llvm::TargetTransformInfo::getArithmeticReductionCost(), llvm::TargetTransformInfo::getCastInstrCost(), llvm::TargetTransformInfo::getCFInstrCost(), llvm::TargetTransformInfo::getCmpSelInstrCost(), llvm::SelectInst::getCondition(), llvm::TargetTransformInfo::getIntrinsicInstrCost(), llvm::TargetTransformInfo::getMemoryOpCost(), llvm::TargetTransformInfo::getMinMaxReductionCost(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::TargetTransformInfo::getOperandInfo(), llvm::LoadInst::getPointerAddressSpace(), llvm::StoreInst::getPointerAddressSpace(), getReductionData(), getShuffleAndOtherOprd(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::Value::getType(), llvm::InsertElementInst::getType(), llvm::ShuffleVectorInst::getType(), llvm::TargetTransformInfo::getUserCost(), llvm::StoreInst::getValueOperand(), llvm::TargetTransformInfo::getVectorInstrCost(), llvm::Type::getVectorNumElements(), llvm::ConstantInt::getZExtValue(), I, llvm::ARM_PROC::IE, llvm::ShuffleVectorInst::isExtractSubvectorMask(), llvm::ShuffleVectorInst::isIdentity(), llvm::isPowerOf2_32(), llvm::ShuffleVectorInst::isReverse(), llvm::ShuffleVectorInst::isSelect(), llvm::ShuffleVectorInst::isSingleSource(), llvm::ShuffleVectorInst::isTranspose(), llvm::ShuffleVectorInst::isZeroEltSplat(), llvm::SPII::Load, llvm::CmpInst::makeCmpResultType(), llvm::BitmaskEnumDetail::Mask(), matchPairwiseReduction(), llvm::User::operand_values(), llvm::MipsISD::Ret, llvm::MCID::Select, SI, llvm::TargetTransformInfo::SK_Broadcast, llvm::TargetTransformInfo::SK_ExtractSubvector, llvm::TargetTransformInfo::SK_PermuteSingleSrc, llvm::TargetTransformInfo::SK_PermuteTwoSrc, llvm::TargetTransformInfo::SK_Reverse, llvm::TargetTransformInfo::SK_Select, llvm::TargetTransformInfo::SK_Transpose, and llvm::SPII::Store.

Variable Documentation

◆ EnableReduxCost

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