|
LLVM
10.0.0
|
#include "Target/AArch64/AArch64TargetTransformInfo.h"
Additional Inherited Members | |
Protected Types inherited from llvm::TargetTransformInfoImplBase | |
| typedef TargetTransformInfo | TTI |
Protected Member Functions inherited from llvm::BasicTTIImplBase< AArch64TTIImpl > | |
| BasicTTIImplBase (const TargetMachine *TM, const DataLayout &DL) | |
| virtual | ~BasicTTIImplBase ()=default |
Protected Member Functions inherited from llvm::TargetTransformInfoImplCRTPBase< AArch64TTIImpl > | |
| TargetTransformInfoImplCRTPBase (const DataLayout &DL) | |
Protected Member Functions inherited from llvm::TargetTransformInfoImplBase | |
| TargetTransformInfoImplBase (const DataLayout &DL) | |
| unsigned | minRequiredElementSize (const Value *Val, bool &isSigned) |
| bool | isStridedAccess (const SCEV *Ptr) |
| const SCEVConstant * | getConstantStrideStep (ScalarEvolution *SE, const SCEV *Ptr) |
| bool | isConstantStridedAccessLessThan (ScalarEvolution *SE, const SCEV *Ptr, int64_t MergeDistance) |
Protected Attributes inherited from llvm::TargetTransformInfoImplBase | |
| const DataLayout & | DL |
Definition at line 41 of file AArch64TargetTransformInfo.h.
|
inlineexplicit |
Definition at line 63 of file AArch64TargetTransformInfo.h.
References areInlineCompatible(), Callee, getIntImmCost(), llvm::TargetTransformInfoImplBase::getIntImmCost(), getIntImmCostInst(), getIntImmCostIntrin(), and getPopcntSupport().
Definition at line 28 of file AArch64TargetTransformInfo.cpp.
References llvm::MCSubtargetInfo::getFeatureBits(), llvm::TargetMachine::getSubtargetImpl(), llvm::TargetLoweringBase::getTargetMachine(), and llvm::SystemZISD::TM.
Referenced by AArch64TTIImpl().
|
inline |
Definition at line 87 of file AArch64TargetTransformInfo.h.
| AArch64TTIImpl::TTI::MemCmpExpansionOptions AArch64TTIImpl::enableMemCmpExpansion | ( | bool | OptSize, |
| bool | IsZeroCmp | ||
| ) | const |
Definition at line 630 of file AArch64TargetTransformInfo.cpp.
References llvm::TargetTransformInfo::MemCmpExpansionOptions::AllowOverlappingLoads, llvm::TargetLoweringBase::getMaxExpandSizeMemcmp(), llvm::TargetTransformInfo::MemCmpExpansionOptions::LoadSizes, llvm::TargetTransformInfo::MemCmpExpansionOptions::MaxNumLoads, llvm::TargetTransformInfo::MemCmpExpansionOptions::NumLoadsPerBlock, and llvm::AArch64Subtarget::requiresStrictAlign().
Referenced by getMinVectorRegisterBitWidth().
| int AArch64TTIImpl::getAddressComputationCost | ( | Type * | Ty, |
| ScalarEvolution * | SE, | ||
| const SCEV * | Ptr | ||
| ) |
Definition at line 580 of file AArch64TargetTransformInfo.cpp.
References llvm::TargetTransformInfoImplBase::isConstantStridedAccessLessThan(), and llvm::Type::isVectorTy().
Referenced by getMinVectorRegisterBitWidth().
| int AArch64TTIImpl::getArithmeticInstrCost | ( | unsigned | Opcode, |
| Type * | Ty, | ||
| 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 485 of file AArch64TargetTransformInfo.cpp.
References llvm::MCID::Add, llvm::ISD::ADD, llvm::ISD::AND, llvm::TargetTransformInfoImplBase::DL, llvm::BasicTTIImplBase< AArch64TTIImpl >::getArithmeticInstrCost(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), llvm::AArch64Subtarget::getWideningBaseCost(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::TargetLoweringBase::isOperationLegalOrCustom(), 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::ISD::UDIV, and llvm::ISD::XOR.
Referenced by getMinVectorRegisterBitWidth().
Definition at line 928 of file AArch64TargetTransformInfo.cpp.
References llvm::ISD::ADD, assert(), llvm::CostTableLookup(), llvm::TargetTransformInfoImplBase::DL, llvm::BasicTTIImplBase< AArch64TTIImpl >::getArithmeticReductionCost(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::AArch64CC::LT, llvm::MVT::v16i8, llvm::MVT::v4i16, llvm::MVT::v4i32, llvm::MVT::v8i16, and llvm::MVT::v8i8.
Referenced by getGISelRematGlobalCost().
| int AArch64TTIImpl::getCastInstrCost | ( | unsigned | Opcode, |
| Type * | Dst, | ||
| Type * | Src, | ||
| const Instruction * | I = nullptr |
||
| ) |
Definition at line 269 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::ConvertCostTableLookup(), llvm::TargetTransformInfoImplBase::DL, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::BasicTTIImplBase< AArch64TTIImpl >::getCastInstrCost(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::EVT::getSimpleVT(), llvm::TargetLoweringBase::getValueType(), llvm::Value::hasOneUse(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::EVT::isSimple(), Operands, llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, llvm::Value::user_begin(), 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.
Referenced by getExtractWithExtendCost(), and getMinVectorRegisterBitWidth().
| int AArch64TTIImpl::getCmpSelInstrCost | ( | unsigned | Opcode, |
| Type * | ValTy, | ||
| Type * | CondTy, | ||
| const Instruction * | I = nullptr |
||
| ) |
Definition at line 598 of file AArch64TargetTransformInfo.cpp.
References llvm::ConvertCostTableLookup(), llvm::TargetTransformInfoImplBase::DL, llvm::BasicTTIImplBase< AArch64TTIImpl >::getCmpSelInstrCost(), llvm::EVT::getSimpleVT(), llvm::TargetLoweringBase::getValueType(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::EVT::isSimple(), llvm::Type::isVectorTy(), llvm::ISD::SELECT, llvm::MVT::v16i1, llvm::MVT::v16i16, llvm::MVT::v16i32, llvm::MVT::v16i64, llvm::MVT::v4i1, llvm::MVT::v4i64, llvm::MVT::v8i1, llvm::MVT::v8i32, and llvm::MVT::v8i64.
Referenced by getMinVectorRegisterBitWidth().
Definition at line 708 of file AArch64TargetTransformInfo.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, getMemoryOpCost(), I, llvm::SPII::Load, and llvm::SPII::Store.
Referenced by getMinVectorRegisterBitWidth().
| int AArch64TTIImpl::getExtractWithExtendCost | ( | unsigned | Opcode, |
| Type * | Dst, | ||
| VectorType * | VecTy, | ||
| unsigned | Index | ||
| ) |
Definition at line 405 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::TargetTransformInfoImplBase::DL, getCastInstrCost(), llvm::SequentialType::getElementType(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), getVectorInstrCost(), llvm::TargetLoweringBase::isTypeLegal(), and llvm_unreachable.
Referenced by getMinVectorRegisterBitWidth().
|
inline |
Definition at line 203 of file AArch64TargetTransformInfo.h.
References getArithmeticReductionCost(), getShuffleCost(), and useReductionIntrinsic().
| int AArch64TTIImpl::getInterleavedMemoryOpCost | ( | unsigned | Opcode, |
| Type * | VecTy, | ||
| unsigned | Factor, | ||
| ArrayRef< unsigned > | Indices, | ||
| unsigned | Alignment, | ||
| unsigned | AddressSpace, | ||
| bool | UseMaskForCond = false, |
||
| bool | UseMaskForGaps = false |
||
| ) |
Definition at line 680 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::TargetTransformInfoImplBase::DL, llvm::VectorType::get(), llvm::BasicTTIImplBase< AArch64TTIImpl >::getInterleavedMemoryOpCost(), llvm::AArch64TargetLowering::getNumInterleavedAccesses(), llvm::Type::getScalarType(), llvm::Type::getVectorNumElements(), and llvm::AArch64TargetLowering::isLegalInterleavedAccessType().
Referenced by isLegalMaskedStore().
| 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 45 of file AArch64TargetTransformInfo.cpp.
References llvm::AArch64_IMM::expandMOVImm(), llvm::AArch64_AM::isLogicalImmediate(), and llvm::SmallVectorBase::size().
Referenced by AArch64TTIImpl(), getIntImmCost(), getIntImmCostInst(), and getIntImmCostIntrin().
Calculate the cost of materializing the given constant.
Definition at line 60 of file AArch64TargetTransformInfo.cpp.
References llvm::APInt::ashr(), assert(), getIntImmCost(), llvm::Type::getPrimitiveSizeInBits(), llvm::APInt::getSExtValue(), llvm::Type::isIntegerTy(), llvm::max(), llvm::APInt::sext(), and llvm::APInt::sextOrTrunc().
| int AArch64TTIImpl::getIntImmCostInst | ( | unsigned | Opcode, |
| unsigned | Idx, | ||
| const APInt & | Imm, | ||
| Type * | Ty | ||
| ) |
Definition at line 84 of file AArch64TargetTransformInfo.cpp.
References llvm::MCID::Add, assert(), llvm::MCID::Call, 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.
Referenced by AArch64TTIImpl().
| int AArch64TTIImpl::getIntImmCostIntrin | ( | Intrinsic::ID | IID, |
| unsigned | Idx, | ||
| const APInt & | Imm, | ||
| Type * | Ty | ||
| ) |
Definition at line 150 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::APInt::getBitWidth(), getIntImmCost(), llvm::Type::getPrimitiveSizeInBits(), llvm::APInt::getSExtValue(), llvm::Type::isIntegerTy(), llvm::TargetTransformInfo::TCC_Basic, and llvm::TargetTransformInfo::TCC_Free.
Referenced by AArch64TTIImpl().
Definition at line 720 of file AArch64TargetTransformInfo.cpp.
References llvm::AArch64Subtarget::getMaxInterleaveFactor().
Referenced by getMinVectorRegisterBitWidth().
| int AArch64TTIImpl::getMemoryOpCost | ( | unsigned | Opcode, |
| Type * | Src, | ||
| MaybeAlign | Alignment, | ||
| unsigned | AddressSpace, | ||
| const Instruction * | I = nullptr |
||
| ) |
Definition at line 642 of file AArch64TargetTransformInfo.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::TargetTransformInfoImplBase::DL, llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::Type::getVectorElementType(), llvm::Type::getVectorNumElements(), llvm::Type::isIntegerTy(), llvm::AArch64Subtarget::isMisaligned128StoreSlow(), llvm::Type::isVectorTy(), llvm::AArch64CC::LT, and llvm::SPII::Store.
Referenced by getCostOfKeepingLiveOverCall(), and getMinVectorRegisterBitWidth().
|
inline |
Definition at line 108 of file AArch64TargetTransformInfo.h.
References enableMemCmpExpansion(), getAddressComputationCost(), getArithmeticInstrCost(), getCastInstrCost(), getCmpSelInstrCost(), getCostOfKeepingLiveOverCall(), getExtractWithExtendCost(), getMaxInterleaveFactor(), getMemoryOpCost(), llvm::AArch64Subtarget::getMinVectorRegisterBitWidth(), getOrCreateResultFromMemIntrinsic(), getTgtMemIntrinsic(), getUnrollingPreferences(), getVectorInstrCost(), I, Info, llvm::TargetTransformInfo::OK_AnyValue, and llvm::TargetTransformInfo::OP_None.
Definition at line 89 of file AArch64TargetTransformInfo.h.
References llvm::AArch64Subtarget::hasNEON(), and llvm::Vector.
| Value * AArch64TTIImpl::getOrCreateResultFromMemIntrinsic | ( | IntrinsicInst * | Inst, |
| Type * | ExpectedType | ||
| ) |
Definition at line 795 of file AArch64TargetTransformInfo.cpp.
References llvm::IRBuilder< T, Inserter >::CreateInsertValue(), llvm::dyn_cast(), llvm::numbers::e, llvm::UndefValue::get(), llvm::CallBase::getArgOperand(), llvm::StructType::getElementType(), llvm::IntrinsicInst::getIntrinsicID(), llvm::CallBase::getNumArgOperands(), llvm::StructType::getNumElements(), and llvm::Value::getType().
Referenced by getMinVectorRegisterBitWidth().
| TargetTransformInfo::PopcntSupportKind AArch64TTIImpl::getPopcntSupport | ( | unsigned | TyWidth | ) |
Definition at line 197 of file AArch64TargetTransformInfo.cpp.
References llvm::MCID::Add, llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::TargetTransformInfoImplBase::DL, llvm::VectorType::get(), llvm::Type::getScalarSizeInBits(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::Type::getVectorNumElements(), hasOneUse(), llvm::isPowerOf2_32(), llvm::Type::isVectorTy(), llvm::TargetTransformInfo::PSK_FastHardware, llvm::TargetTransformInfo::PSK_Software, and llvm::ArrayRef< T >::size().
Referenced by AArch64TTIImpl().
Definition at line 99 of file AArch64TargetTransformInfo.h.
References llvm::AArch64Subtarget::hasNEON().
| int AArch64TTIImpl::getShuffleCost | ( | TTI::ShuffleKind | Kind, |
| Type * | Tp, | ||
| int | Index, | ||
| Type * | SubTp | ||
| ) |
Definition at line 956 of file AArch64TargetTransformInfo.cpp.
References llvm::CostTableLookup(), llvm::TargetTransformInfoImplBase::DL, llvm::BasicTTIImplBase< AArch64TTIImpl >::getShuffleCost(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::AArch64CC::LT, llvm::TargetTransformInfo::SK_Broadcast, llvm::TargetTransformInfo::SK_PermuteSingleSrc, 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.
Referenced by getGISelRematGlobalCost().
| bool AArch64TTIImpl::getTgtMemIntrinsic | ( | IntrinsicInst * | Inst, |
| MemIntrinsicInfo & | Info | ||
| ) |
Definition at line 831 of file AArch64TargetTransformInfo.cpp.
References llvm::CallBase::getArgOperand(), llvm::IntrinsicInst::getIntrinsicID(), llvm::CallBase::getNumArgOperands(), llvm::MemIntrinsicInfo::MatchingId, llvm::MemIntrinsicInfo::PtrVal, llvm::MemIntrinsicInfo::ReadMem, and llvm::MemIntrinsicInfo::WriteMem.
Referenced by getMinVectorRegisterBitWidth().
| void AArch64TTIImpl::getUnrollingPreferences | ( | Loop * | L, |
| ScalarEvolution & | SE, | ||
| TTI::UnrollingPreferences & | UP | ||
| ) |
Definition at line 776 of file AArch64TargetTransformInfo.cpp.
References EnableFalkorHWPFUnrollFix, llvm::AArch64Subtarget::Falkor, getFalkorUnrollingPreferences(), llvm::LoopBase< BlockT, LoopT >::getLoopDepth(), llvm::AArch64Subtarget::getProcFamily(), llvm::BasicTTIImplBase< AArch64TTIImpl >::getUnrollingPreferences(), if(), llvm::TargetTransformInfo::UnrollingPreferences::PartialOptSizeThreshold, and llvm::TargetTransformInfo::UnrollingPreferences::PartialThreshold.
Referenced by getMinVectorRegisterBitWidth().
Definition at line 460 of file AArch64TargetTransformInfo.cpp.
References assert(), llvm::TargetTransformInfoImplBase::DL, llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::AArch64Subtarget::getVectorInsertExtractBaseCost(), llvm::Type::isVectorTy(), and llvm::AArch64CC::LT.
Referenced by getExtractWithExtendCost(), and getMinVectorRegisterBitWidth().
|
inline |
Definition at line 167 of file AArch64TargetTransformInfo.h.
References isLegalMaskedLoadStore().
|
inline |
Definition at line 152 of file AArch64TargetTransformInfo.h.
References llvm::Type::getVectorElementType(), llvm::AArch64Subtarget::hasSVE(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isHalfTy(), and llvm::Type::isIntegerTy().
Referenced by isLegalMaskedLoad(), and isLegalMaskedStore().
|
inline |
Definition at line 171 of file AArch64TargetTransformInfo.h.
References getInterleavedMemoryOpCost(), I, isLegalMaskedLoadStore(), and shouldConsiderAddressTypePromotion().
| 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 876 of file AArch64TargetTransformInfo.cpp.
References llvm::Function::getContext(), llvm::Type::getInt64Ty(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::Value::getType(), and llvm::Value::users().
Referenced by isLegalMaskedStore().
|
inline |
Definition at line 185 of file AArch64TargetTransformInfo.h.
References llvm::FastMathFlags::allowReassoc(), llvm::Instruction::getFastMathFlags(), llvm::IntrinsicInst::getIntrinsicID(), and llvm::FastMathFlags::noNaNs().
| bool AArch64TTIImpl::useReductionIntrinsic | ( | unsigned | Opcode, |
| Type * | Ty, | ||
| TTI::ReductionFlags | Flags | ||
| ) | const |
Definition at line 903 of file AArch64TargetTransformInfo.cpp.
References llvm::MCID::Add, assert(), llvm::Type::getScalarSizeInBits(), llvm::Type::getVectorNumElements(), llvm_unreachable, and llvm::TargetTransformInfo::ReductionFlags::NoNaN.
Referenced by getGISelRematGlobalCost().
1.8.13