LLVM
13.0.0git
|
#include "Target/AArch64/AArch64TargetTransformInfo.h"
Definition at line 41 of file AArch64TargetTransformInfo.h.
|
inlineexplicit |
Definition at line 63 of file AArch64TargetTransformInfo.h.
Definition at line 30 of file AArch64TargetTransformInfo.cpp.
References llvm::SystemZISD::TM.
|
inline |
Definition at line 88 of file AArch64TargetTransformInfo.h.
AArch64TTIImpl::TTI::MemCmpExpansionOptions AArch64TTIImpl::enableMemCmpExpansion | ( | bool | OptSize, |
bool | IsZeroCmp | ||
) | const |
Definition at line 783 of file AArch64TargetTransformInfo.cpp.
References llvm::TargetTransformInfo::MemCmpExpansionOptions::AllowOverlappingLoads, llvm::TargetTransformInfo::MemCmpExpansionOptions::LoadSizes, llvm::TargetTransformInfo::MemCmpExpansionOptions::MaxNumLoads, llvm::TargetTransformInfo::MemCmpExpansionOptions::NumLoadsPerBlock, and llvm::ARM_MB::ST.
int AArch64TTIImpl::getAddressComputationCost | ( | Type * | Ty, |
ScalarEvolution * | SE, | ||
const SCEV * | Ptr | ||
) |
Definition at line 705 of file AArch64TargetTransformInfo.cpp.
References llvm::Type::isVectorTy().
int AArch64TTIImpl::getArithmeticInstrCost | ( | unsigned | Opcode, |
Type * | Ty, | ||
TTI::TargetCostKind | CostKind = TTI::TCK_RecipThroughput , |
||
TTI::OperandValueKind | Opd1Info = TTI::OK_AnyValue , |
||
TTI::OperandValueKind | Opd2Info = TTI::OK_AnyValue , |
||
TTI::OperandValueProperties | Opd1PropInfo = TTI::OP_None , |
||
TTI::OperandValueProperties | Opd2PropInfo = TTI::OP_None , |
||
ArrayRef< const Value * > | Args = ArrayRef<const Value *>() , |
||
const Instruction * | CxtI = nullptr |
||
) |
Definition at line 573 of file AArch64TargetTransformInfo.cpp.
References llvm::MCID::Add, llvm::ISD::ADD, llvm::ISD::AND, llvm::AMDGPU::HSAMD::Kernel::Key::Args, CostKind, DL, llvm::ISD::FADD, llvm::Type::getScalarType(), llvm::Type::isFP128Ty(), llvm::Type::isVectorTy(), LLVM_FALLTHROUGH, llvm::AArch64CC::LT, llvm::ISD::MUL, llvm::ISD::MULHU, llvm::TargetTransformInfo::OK_UniformConstantValue, llvm::TargetTransformInfo::OP_None, llvm::TargetTransformInfo::OP_PowerOf2, llvm::ISD::OR, llvm::ISD::SDIV, llvm::MCID::Select, llvm::ARM_MB::ST, llvm::TargetTransformInfo::TCK_RecipThroughput, llvm::ISD::UDIV, llvm::MVT::v2i64, and llvm::ISD::XOR.
int AArch64TTIImpl::getArithmeticReductionCost | ( | unsigned | Opcode, |
VectorType * | Ty, | ||
bool | IsPairwiseForm, | ||
TTI::TargetCostKind | CostKind = TTI::TCK_RecipThroughput |
||
) |
Definition at line 1184 of file AArch64TargetTransformInfo.cpp.
References llvm::ISD::ADD, assert(), CostKind, DL, llvm::AArch64CC::LT, llvm::MVT::v16i8, llvm::MVT::v4i16, llvm::MVT::v4i32, llvm::MVT::v8i16, and llvm::MVT::v8i8.
int AArch64TTIImpl::getArithmeticReductionCostSVE | ( | unsigned | Opcode, |
VectorType * | ValTy, | ||
bool | IsPairwiseForm, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 1154 of file AArch64TargetTransformInfo.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, assert(), CostKind, DL, llvm::ISD::FADD, llvm::Type::getContext(), llvm::EVT::getTypeForEVT(), llvm::AArch64CC::LT, llvm::ISD::OR, and llvm::ISD::XOR.
int AArch64TTIImpl::getCastInstrCost | ( | unsigned | Opcode, |
Type * | Dst, | ||
Type * | Src, | ||
TTI::CastContextHint | CCH, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 333 of file AArch64TargetTransformInfo.cpp.
References assert(), CostKind, DL, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, I, llvm::EVT::isSimple(), Operands, llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::TargetTransformInfo::TCK_RecipThroughput, llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, llvm::MVT::v16f32, llvm::MVT::v16i16, llvm::MVT::v16i32, llvm::MVT::v16i8, llvm::MVT::v2f32, llvm::MVT::v2f64, llvm::MVT::v2i16, llvm::MVT::v2i32, llvm::MVT::v2i64, llvm::MVT::v2i8, llvm::MVT::v4f32, llvm::MVT::v4i16, llvm::MVT::v4i32, llvm::MVT::v4i64, llvm::MVT::v4i8, llvm::MVT::v8f32, llvm::MVT::v8i16, llvm::MVT::v8i32, llvm::MVT::v8i64, llvm::MVT::v8i8, and llvm::ISD::ZERO_EXTEND.
unsigned AArch64TTIImpl::getCFInstrCost | ( | unsigned | Opcode, |
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 539 of file AArch64TargetTransformInfo.cpp.
References assert(), CostKind, and llvm::TargetTransformInfo::TCK_RecipThroughput.
int AArch64TTIImpl::getCmpSelInstrCost | ( | unsigned | Opcode, |
Type * | ValTy, | ||
Type * | CondTy, | ||
CmpInst::Predicate | VecPred, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 723 of file AArch64TargetTransformInfo.cpp.
References llvm::any_of(), llvm::CmpInst::BAD_ICMP_PREDICATE, CostKind, DL, I, llvm::CmpInst::isIntPredicate(), llvm::EVT::isSimple(), llvm::AArch64CC::LT, M, llvm::PatternMatch::m_Cmp(), llvm::PatternMatch::m_Select(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::ISD::SELECT, llvm::TargetTransformInfo::TCK_RecipThroughput, llvm::MVT::v16i1, llvm::MVT::v16i16, llvm::MVT::v16i32, llvm::MVT::v16i64, llvm::MVT::v16i8, llvm::MVT::v2i32, llvm::MVT::v2i64, llvm::MVT::v4i1, llvm::MVT::v4i16, llvm::MVT::v4i32, llvm::MVT::v4i64, llvm::MVT::v8i1, llvm::MVT::v8i16, llvm::MVT::v8i32, llvm::MVT::v8i64, and llvm::MVT::v8i8.
Definition at line 899 of file AArch64TargetTransformInfo.cpp.
References Align, CostKind, I, llvm::SPII::Load, llvm::SPII::Store, and llvm::TargetTransformInfo::TCK_RecipThroughput.
int AArch64TTIImpl::getExtractWithExtendCost | ( | unsigned | Opcode, |
Type * | Dst, | ||
VectorType * | VecTy, | ||
unsigned | Index | ||
) |
Definition at line 480 of file AArch64TargetTransformInfo.cpp.
References assert(), CostKind, DL, llvm::VectorType::getElementType(), Index, llvm_unreachable, llvm::TargetTransformInfo::None, and llvm::TargetTransformInfo::TCK_RecipThroughput.
unsigned AArch64TTIImpl::getGatherScatterOpCost | ( | unsigned | Opcode, |
Type * | DataTy, | ||
const Value * | Ptr, | ||
bool | VariableMask, | ||
Align | Alignment, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 800 of file AArch64TargetTransformInfo.cpp.
References assert(), CostKind, DL, llvm::LinearPolySize< LeafTy >::getKnownMinValue(), llvm::Optional< T >::getValue(), I, and llvm::AArch64CC::LT.
|
inline |
Definition at line 265 of file AArch64TargetTransformInfo.h.
int AArch64TTIImpl::getInterleavedMemoryOpCost | ( | unsigned | Opcode, |
Type * | VecTy, | ||
unsigned | Factor, | ||
ArrayRef< unsigned > | Indices, | ||
Align | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind = TTI::TCK_SizeAndLatency , |
||
bool | UseMaskForCond = false , |
||
bool | UseMaskForGaps = false |
||
) |
Definition at line 873 of file AArch64TargetTransformInfo.cpp.
References assert(), CostKind, DL, llvm::FixedVectorType::get(), and llvm::Type::getScalarType().
int AArch64TTIImpl::getIntImmCost | ( | const APInt & | Imm, |
Type * | Ty, | ||
TTI::TargetCostKind | CostKind | ||
) |
Calculate the cost of materializing the given constant.
Definition at line 62 of file AArch64TargetTransformInfo.cpp.
References llvm::APInt::ashr(), assert(), llvm::Type::getPrimitiveSizeInBits(), llvm::APInt::getSExtValue(), llvm::Type::isIntegerTy(), llvm::max(), llvm::APInt::sext(), and llvm::APInt::sextOrTrunc().
int AArch64TTIImpl::getIntImmCost | ( | int64_t | Val | ) |
Calculate the cost of materializing a 64-bit value.
This helper method might only calculate a fraction of a larger immediate. Therefore it is valid to return a cost of ZERO.
Definition at line 47 of file AArch64TargetTransformInfo.cpp.
References llvm::AArch64_IMM::expandMOVImm(), and llvm::AArch64_AM::isLogicalImmediate().
Referenced by getIntImmCostInst(), and getIntImmCostIntrin().
int AArch64TTIImpl::getIntImmCostInst | ( | unsigned | Opcode, |
unsigned | Idx, | ||
const APInt & | Imm, | ||
Type * | Ty, | ||
TTI::TargetCostKind | CostKind, | ||
Instruction * | Inst = nullptr |
||
) |
Definition at line 87 of file AArch64TargetTransformInfo.cpp.
References llvm::MCID::Add, assert(), llvm::MCID::Call, CostKind, getIntImmCost(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::isIntegerTy(), llvm::SPII::Load, llvm::MipsISD::Ret, llvm::MCID::Select, llvm::SPII::Store, llvm::TargetTransformInfo::TCC_Basic, and llvm::TargetTransformInfo::TCC_Free.
int AArch64TTIImpl::getIntImmCostIntrin | ( | Intrinsic::ID | IID, |
unsigned | Idx, | ||
const APInt & | Imm, | ||
Type * | Ty, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 155 of file AArch64TargetTransformInfo.cpp.
References assert(), CostKind, llvm::APInt::getBitWidth(), getIntImmCost(), llvm::Type::getPrimitiveSizeInBits(), llvm::APInt::getSExtValue(), llvm::Type::isIntegerTy(), llvm::TargetTransformInfo::TCC_Basic, and llvm::TargetTransformInfo::TCC_Free.
unsigned AArch64TTIImpl::getIntrinsicInstrCost | ( | const IntrinsicCostAttributes & | ICA, |
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 216 of file AArch64TargetTransformInfo.cpp.
References llvm::abs(), llvm::any_of(), CostKind, DL, llvm::IntrinsicCostAttributes::getID(), llvm::IntrinsicCostAttributes::getReturnType(), LLVM_FALLTHROUGH, llvm::AArch64CC::LT, M, llvm::APIntOps::smax(), llvm::APIntOps::smin(), llvm::APIntOps::umax(), llvm::APIntOps::umin(), llvm::MVT::v16i8, llvm::MVT::v2i32, llvm::MVT::v2i64, llvm::MVT::v4i16, llvm::MVT::v4i32, llvm::MVT::v8i16, and llvm::MVT::v8i8.
unsigned AArch64TTIImpl::getMaxInterleaveFactor | ( | unsigned | VF | ) |
Definition at line 913 of file AArch64TargetTransformInfo.cpp.
References llvm::ARM_MB::ST.
|
inline |
Definition at line 118 of file AArch64TargetTransformInfo.h.
References llvm::BasicTTIImplBase< AArch64TTIImpl >::getMaxVScale(), llvm::AArch64::SVEBitsPerBlock, and llvm::AArch64::SVEMaxBitsPerVector.
int AArch64TTIImpl::getMemoryOpCost | ( | unsigned | Opcode, |
Type * | Src, | ||
MaybeAlign | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 824 of file AArch64TargetTransformInfo.cpp.
References CostKind, DL, llvm::AArch64CC::LT, llvm::MVT::Other, llvm::ARM_MB::ST, llvm::SPII::Store, and llvm::TargetTransformInfo::TCK_RecipThroughput.
int AArch64TTIImpl::getMinMaxReductionCost | ( | VectorType * | Ty, |
VectorType * | CondTy, | ||
bool | IsPairwise, | ||
bool | IsUnsigned, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 1128 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::CmpInst::BAD_ICMP_PREDICATE, CostKind, DL, llvm::Type::getContext(), llvm::EVT::getTypeForEVT(), llvm::Type::isFPOrFPVectorTy(), llvm::AArch64CC::LT, and llvm::MCID::Select.
|
inline |
Definition at line 114 of file AArch64TargetTransformInfo.h.
|
inline |
Definition at line 90 of file AArch64TargetTransformInfo.h.
References Vector.
Value * AArch64TTIImpl::getOrCreateResultFromMemIntrinsic | ( | IntrinsicInst * | Inst, |
Type * | ExpectedType | ||
) |
Definition at line 993 of file AArch64TargetTransformInfo.cpp.
References Builder, llvm::numbers::e, llvm::UndefValue::get(), llvm::CallBase::getArgOperand(), llvm::IntrinsicInst::getIntrinsicID(), llvm::CallBase::getNumArgOperands(), llvm::Value::getType(), i, and llvm::ARM_MB::ST.
void AArch64TTIImpl::getPeelingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::PeelingPreferences & | PP | ||
) |
Definition at line 988 of file AArch64TargetTransformInfo.cpp.
TargetTransformInfo::PopcntSupportKind AArch64TTIImpl::getPopcntSupport | ( | unsigned | TyWidth | ) |
Definition at line 207 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::isPowerOf2_32(), llvm::TargetTransformInfo::PSK_FastHardware, and llvm::TargetTransformInfo::PSK_Software.
|
inline |
Definition at line 103 of file AArch64TargetTransformInfo.h.
References llvm::max(), and Vector.
int AArch64TTIImpl::getShuffleCost | ( | TTI::ShuffleKind | Kind, |
VectorType * | Tp, | ||
int | Index, | ||
VectorType * | SubTp | ||
) |
Definition at line 1219 of file AArch64TargetTransformInfo.cpp.
References DL, llvm::AArch64CC::LT, llvm::MVT::nxv16i1, llvm::MVT::nxv16i8, llvm::MVT::nxv2f64, llvm::MVT::nxv2i1, llvm::MVT::nxv2i64, llvm::MVT::nxv4f32, llvm::MVT::nxv4i1, llvm::MVT::nxv4i32, llvm::MVT::nxv8bf16, llvm::MVT::nxv8f16, llvm::MVT::nxv8i1, llvm::MVT::nxv8i16, llvm::TargetTransformInfo::SK_Broadcast, llvm::TargetTransformInfo::SK_PermuteSingleSrc, llvm::TargetTransformInfo::SK_Reverse, llvm::TargetTransformInfo::SK_Select, llvm::TargetTransformInfo::SK_Transpose, llvm::MVT::v16i8, llvm::MVT::v2f32, llvm::MVT::v2f64, llvm::MVT::v2i32, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4i16, llvm::MVT::v4i32, llvm::MVT::v8i16, and llvm::MVT::v8i8.
bool AArch64TTIImpl::getTgtMemIntrinsic | ( | IntrinsicInst * | Inst, |
MemIntrinsicInfo & | Info | ||
) |
Definition at line 1029 of file AArch64TargetTransformInfo.cpp.
References llvm::CallBase::getArgOperand(), llvm::IntrinsicInst::getIntrinsicID(), llvm::CallBase::getNumArgOperands(), and Info.
void AArch64TTIImpl::getUnrollingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::UnrollingPreferences & | UP | ||
) |
Definition at line 969 of file AArch64TargetTransformInfo.cpp.
References EnableFalkorHWPFUnrollFix, llvm::AArch64Subtarget::Falkor, getFalkorUnrollingPreferences(), llvm::LoopBase< BlockT, LoopT >::getLoopDepth(), llvm::TargetTransformInfo::UnrollingPreferences::PartialOptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::PartialThreshold, and llvm::ARM_MB::ST.
Definition at line 548 of file AArch64TargetTransformInfo.cpp.
References assert(), DL, Index, llvm::Type::isVectorTy(), llvm::AArch64CC::LT, and llvm::ARM_MB::ST.
|
inline |
Definition at line 189 of file AArch64TargetTransformInfo.h.
References llvm::Type::isBFloatTy(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isHalfTy(), llvm::Type::isIntegerTy(), and llvm::Type::isPointerTy().
Referenced by isLegalMaskedGatherScatter(), and isLegalMaskedLoadStore().
Definition at line 228 of file AArch64TargetTransformInfo.h.
References isLegalMaskedGatherScatter().
|
inline |
Definition at line 221 of file AArch64TargetTransformInfo.h.
References llvm::Type::getScalarType(), and isLegalElementTypeForSVE().
Referenced by isLegalMaskedGather(), and isLegalMaskedScatter().
Definition at line 213 of file AArch64TargetTransformInfo.h.
References isLegalMaskedLoadStore().
Definition at line 206 of file AArch64TargetTransformInfo.h.
References llvm::Type::getScalarType(), and isLegalElementTypeForSVE().
Referenced by isLegalMaskedLoad(), and isLegalMaskedStore().
Definition at line 231 of file AArch64TargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Definition at line 217 of file AArch64TargetTransformInfo.h.
References isLegalMaskedLoadStore().
Definition at line 235 of file AArch64TargetTransformInfo.h.
References llvm::TargetTransformInfoImplBase::isLegalNTStore(), and llvm::isPowerOf2_64().
bool AArch64TTIImpl::isLegalToVectorizeReduction | ( | RecurrenceDescriptor | RdxDesc, |
ElementCount | VF | ||
) | const |
Definition at line 1101 of file AArch64TargetTransformInfo.cpp.
References llvm::Add, llvm::And, llvm::FAdd, llvm::FMax, llvm::FMin, llvm::RecurrenceDescriptor::getRecurrenceKind(), llvm::RecurrenceDescriptor::getRecurrenceType(), llvm::Type::isBFloatTy(), llvm::LinearPolySize< LeafTy >::isScalable(), llvm::Or, llvm::SMax, llvm::SMin, llvm::UMax, llvm::UMin, and llvm::Xor.
bool AArch64TTIImpl::shouldConsiderAddressTypePromotion | ( | const Instruction & | I, |
bool & | AllowPromotionWithoutCommonHeader | ||
) |
See if I
should be considered for address type promotion.
We check if I
is a sext with right type and used in memory accesses. If it used in a "complex" getelementptr, we allow it to be promoted without finding other sext instructions that sign extended the same initial value. A getelementptr is considered as "complex" if it has more than 2 operands.
Definition at line 1074 of file AArch64TargetTransformInfo.cpp.
References llvm::Type::getInt64Ty(), and I.
|
inline |
Definition at line 263 of file AArch64TargetTransformInfo.h.
|
inline |
Definition at line 269 of file AArch64TargetTransformInfo.h.
Definition at line 820 of file AArch64TargetTransformInfo.cpp.
References llvm::ARM_MB::ST.