LLVM
8.0.1
|
#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>
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< bool > | EnableReduxCost ("costmodel-reduxcost", cl::init(false), cl::Hidden, cl::desc("Recognize reduction patterns.")) |
#define DEBUG_TYPE "tti" |
Definition at line 27 of file TargetTransformInfo.cpp.
enum ReductionKind |
Kind of the reduction data.
Definition at line 717 of file TargetTransformInfo.cpp.
|
static |
Definition at line 740 of file TargetTransformInfo.cpp.
References llvm::Instruction::getOpcode(), llvm::PatternMatch::m_BinOp(), llvm::PatternMatch::m_OrdFMax(), llvm::PatternMatch::m_OrdFMin(), llvm::PatternMatch::m_SMax(), llvm::PatternMatch::m_SMin(), llvm::PatternMatch::m_UMax(), llvm::PatternMatch::m_UMin(), llvm::PatternMatch::m_UnordFMax(), llvm::PatternMatch::m_UnordFMin(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::None, and SI.
Referenced by matchPairwiseReduction(), matchPairwiseReductionAtLevel(), and matchVectorSplittingReduction().
|
static |
Definition at line 900 of file TargetTransformInfo.cpp.
References llvm::dyn_cast().
Referenced by matchVectorSplittingReduction().
|
static |
Definition at line 846 of file TargetTransformInfo.cpp.
References llvm::dyn_cast(), EnableReduxCost, llvm::User::getOperand(), getReductionData(), llvm::Type::getVectorNumElements(), llvm::ConstantInt::getZExtValue(), llvm::isPowerOf2_32(), llvm::Log2_32(), and matchPairwiseReductionAtLevel().
Referenced by matchVectorSplittingReduction().
|
static |
Definition at line 763 of file TargetTransformInfo.cpp.
References assert(), llvm::dyn_cast(), llvm::User::getOperand(), getReductionData(), llvm::Value::getType(), llvm::Type::isVectorTy(), llvm::AArch64CC::LS, and matchPairwiseShuffleMask().
Referenced by matchPairwiseReduction().
|
static |
Definition at line 695 of file TargetTransformInfo.cpp.
References llvm::ShuffleVectorInst::getShuffleMask(), llvm::ShuffleVectorInst::getType(), llvm::Type::getVectorNumElements(), and llvm::BitmaskEnumDetail::Mask().
Referenced by matchPairwiseReductionAtLevel().
|
static |
Definition at line 911 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.
|
static |
Referenced by matchPairwiseReduction(), and matchVectorSplittingReduction().