LLVM 24.0.0git
SLPCostAnalysis.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Support/InstructionCost.h"
#include <tuple>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::slpvectorizer
 A private "module" namespace for types and utilities used by this pass.

Functions

InstructionCost llvm::slpvectorizer::getShuffleCost (const TargetTransformInfo &TTI, TargetTransformInfo::ShuffleKind Kind, VectorType *Tp, const TargetTransformInfo::TargetCostKind CostKind, ArrayRef< int > Mask={}, int Index=0, VectorType *SubTp=nullptr, ArrayRef< const Value * > Args={})
 Returns the cost of the shuffle instructions with the given Kind, vector type Tp and optional Mask.
std::pair< InstructionCost, InstructionCostllvm::slpvectorizer::getGEPCosts (const TargetTransformInfo &TTI, ArrayRef< Value * > Ptrs, Value *BasePtr, unsigned Opcode, const TargetTransformInfo::TargetCostKind CostKind, Type *ScalarTy, VectorType *VecTy)
 Calculate the scalar and the vector costs from vectorizing set of GEPs.
InstructionCost llvm::slpvectorizer::getBlendedLoadCost (const TargetTransformInfo &TTI, Type *VecTy, Align Alignment, unsigned AddressSpace, const TargetTransformInfo::TargetCostKind CostKind)
 Returns the cost of a BlendedLoadVectorize node loading VecTy: two masked loads (one per candidate base), a xor to negate the false-lane mask and a select.
InstructionCost llvm::slpvectorizer::getMaskedDivRemCost (const TargetTransformInfo &TTI, bool ReVec, unsigned Opcode, Type *ScalarTy, unsigned NumElts, const TargetTransformInfo::TargetCostKind CostKind, FixedVectorType **PaddedTy=nullptr)
 For a non-power-of-2 NumElts-wide integer div/rem Opcode, checks if padding to a full register and using the masked div/rem intrinsic is cheaper than the direct vector op.
InstructionCost llvm::slpvectorizer::getScalarizationOverhead (const TargetTransformInfo &TTI, bool ReVec, Type *ScalarTy, VectorType *Ty, const APInt &DemandedElts, bool Insert, bool Extract, const TargetTransformInfo::TargetCostKind CostKind, bool ForPoisonSrc=true, ArrayRef< Value * > VL={}, TargetTransformInfo::VectorInstrContext VIC=TargetTransformInfo::VectorInstrContext::None)
 This is similar to TargetTransformInfo::getScalarizationOverhead, but if ScalarTy is a FixedVectorType, a vector will be inserted or extracted instead of a scalar.
InstructionCost llvm::slpvectorizer::getVectorInstrCost (const TargetTransformInfo &TTI, bool ReVec, Type *ScalarTy, unsigned Opcode, Type *Val, const TargetTransformInfo::TargetCostKind CostKind, unsigned Index, Value *Scalar, ArrayRef< std::tuple< Value *, User *, int > > ScalarUserAndIdx)
 This is similar to TargetTransformInfo::getVectorInstrCost, but if ScalarTy is a FixedVectorType, a vector will be extracted instead of a scalar.
InstructionCost llvm::slpvectorizer::getExtractWithExtendCost (const TargetTransformInfo &TTI, bool ReVec, unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index, const TargetTransformInfo::TargetCostKind CostKind)
 This is similar to TargetTransformInfo::getExtractWithExtendCost, but if Dst is a FixedVectorType, a vector will be extracted instead of a scalar.