LLVM 20.0.0git
|
#include "Target/PowerPC/PPCTargetTransformInfo.h"
Definition at line 27 of file PPCTargetTransformInfo.h.
Enumerator | |
---|---|
GPRRC | |
FPRRC | |
VRRC | |
VSXRC |
Definition at line 93 of file PPCTargetTransformInfo.h.
|
inlineexplicit |
Definition at line 39 of file PPCTargetTransformInfo.h.
bool PPCTTIImpl::areTypesABICompatible | ( | const Function * | Caller, |
const Function * | Callee, | ||
const ArrayRef< Type * > & | Types | ||
) | const |
Definition at line 898 of file PPCTargetTransformInfo.cpp.
References llvm::TargetTransformInfoImplBase::areTypesABICompatible(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::isIntOrIntVectorTy(), llvm::Type::isSized(), and llvm::none_of().
bool PPCTTIImpl::canSaveCmp | ( | Loop * | L, |
BranchInst ** | BI, | ||
ScalarEvolution * | SE, | ||
LoopInfo * | LI, | ||
DominatorTree * | DT, | ||
AssumptionCache * | AC, | ||
TargetLibraryInfo * | LibInfo | ||
) |
Definition at line 917 of file PPCTargetTransformInfo.cpp.
References llvm::HardwareLoopInfo::canAnalyze(), canSaveCmp(), llvm::HardwareLoopInfo::ExitBranch, I, llvm::HardwareLoopInfo::isHardwareLoopCandidate(), and isHardwareLoopProfitable().
Referenced by canSaveCmp().
Definition at line 426 of file PPCTargetTransformInfo.cpp.
References llvm::PPC::DIR_A2, and llvm::PPCSubtarget::getCPUDirective().
bool PPCTTIImpl::enableInterleavedAccessVectorization | ( | ) |
Definition at line 442 of file PPCTargetTransformInfo.cpp.
PPCTTIImpl::TTI::MemCmpExpansionOptions PPCTTIImpl::enableMemCmpExpansion | ( | bool | OptSize, |
bool | IsZeroCmp | ||
) | const |
Definition at line 435 of file PPCTargetTransformInfo.cpp.
References llvm::TargetLoweringBase::getMaxExpandSizeMemcmp(), and Options.
InstructionCost PPCTTIImpl::getArithmeticInstrCost | ( | unsigned | Opcode, |
Type * | Ty, | ||
TTI::TargetCostKind | CostKind, | ||
TTI::OperandValueInfo | Op1Info = {TTI::OK_AnyValue, TTI::OP_None} , |
||
TTI::OperandValueInfo | Op2Info = {TTI::OK_AnyValue, TTI::OP_None} , |
||
ArrayRef< const Value * > | Args = {} , |
||
const Instruction * | CxtI = nullptr |
||
) |
Definition at line 582 of file PPCTargetTransformInfo.cpp.
References assert(), CostKind, llvm::BasicTTIImplBase< PPCTTIImpl >::getArithmeticInstrCost(), llvm::InstructionCost::getMax(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::InstructionCost::isValid(), llvm::TargetTransformInfo::TCK_RecipThroughput, and vectorCostAdjustmentFactor().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< PPCTTIImpl >.
Definition at line 499 of file PPCTargetTransformInfo.cpp.
References llvm::PPC::DIR_PWR10, llvm::PPC::DIR_PWR11, llvm::PPC::DIR_PWR7, llvm::PPC::DIR_PWR8, llvm::PPC::DIR_PWR9, llvm::PPC::DIR_PWR_FUTURE, and llvm::PPCSubtarget::getCPUDirective().
InstructionCost PPCTTIImpl::getCastInstrCost | ( | unsigned | Opcode, |
Type * | Dst, | ||
Type * | Src, | ||
TTI::CastContextHint | CCH, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 636 of file PPCTargetTransformInfo.cpp.
References assert(), CostKind, llvm::BasicTTIImplBase< PPCTTIImpl >::getCastInstrCost(), llvm::InstructionCost::getMax(), I, llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::InstructionCost::isValid(), llvm::TargetTransformInfo::TCK_RecipThroughput, and vectorCostAdjustmentFactor().
InstructionCost PPCTTIImpl::getCFInstrCost | ( | unsigned | Opcode, |
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 627 of file PPCTargetTransformInfo.cpp.
References CostKind, and llvm::TargetTransformInfo::TCK_RecipThroughput.
InstructionCost PPCTTIImpl::getCmpSelInstrCost | ( | unsigned | Opcode, |
Type * | ValTy, | ||
Type * | CondTy, | ||
CmpInst::Predicate | VecPred, | ||
TTI::TargetCostKind | CostKind, | ||
TTI::OperandValueInfo | Op1Info = {TTI::OK_AnyValue, TTI::OP_None} , |
||
TTI::OperandValueInfo | Op2Info = {TTI::OK_AnyValue, TTI::OP_None} , |
||
const Instruction * | I = nullptr |
||
) |
InstructionCost PPCTTIImpl::getInstructionCost | ( | const User * | U, |
ArrayRef< const Value * > | Operands, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 321 of file PPCTargetTransformInfo.cpp.
References CostKind, llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::BasicTTIImplBase< PPCTTIImpl >::getTypeLegalizationCost(), and Operands.
InstructionCost PPCTTIImpl::getInterleavedMemoryOpCost | ( | unsigned | Opcode, |
Type * | VecTy, | ||
unsigned | Factor, | ||
ArrayRef< unsigned > | Indices, | ||
Align | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind, | ||
bool | UseMaskForCond = false , |
||
bool | UseMaskForGaps = false |
||
) |
Definition at line 858 of file PPCTargetTransformInfo.cpp.
References assert(), CostKind, llvm::BasicTTIImplBase< PPCTTIImpl >::getInterleavedMemoryOpCost(), llvm::InstructionCost::getMax(), getMemoryOpCost(), llvm::BasicTTIImplBase< PPCTTIImpl >::getTypeLegalizationCost(), llvm::InstructionCost::isValid(), and vectorCostAdjustmentFactor().
InstructionCost PPCTTIImpl::getIntImmCost | ( | const APInt & | Imm, |
Type * | Ty, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 163 of file PPCTargetTransformInfo.cpp.
References assert(), CostKind, DisablePPCConstHoist, llvm::TargetTransformInfoImplBase::getIntImmCost(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::isIntegerTy(), llvm::TargetTransformInfo::TCC_Basic, and llvm::TargetTransformInfo::TCC_Free.
Referenced by getIntImmCostInst(), and getIntImmCostIntrin().
InstructionCost PPCTTIImpl::getIntImmCostInst | ( | unsigned | Opcode, |
unsigned | Idx, | ||
const APInt & | Imm, | ||
Type * | Ty, | ||
TTI::TargetCostKind | CostKind, | ||
Instruction * | Inst = nullptr |
||
) |
Definition at line 228 of file PPCTargetTransformInfo.cpp.
References assert(), CostKind, DisablePPCConstHoist, getIntImmCost(), llvm::TargetTransformInfoImplBase::getIntImmCostInst(), llvm::Type::getPrimitiveSizeInBits(), Idx, llvm::Type::isIntegerTy(), llvm::PPCSubtarget::isPPC64(), llvm::isShiftedMask_32(), llvm::isShiftedMask_64(), llvm::TargetTransformInfo::TCC_Basic, and llvm::TargetTransformInfo::TCC_Free.
InstructionCost PPCTTIImpl::getIntImmCostIntrin | ( | Intrinsic::ID | IID, |
unsigned | Idx, | ||
const APInt & | Imm, | ||
Type * | Ty, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 193 of file PPCTargetTransformInfo.cpp.
References assert(), CostKind, DisablePPCConstHoist, getIntImmCost(), llvm::TargetTransformInfoImplBase::getIntImmCostIntrin(), llvm::Type::getPrimitiveSizeInBits(), Idx, llvm::Type::isIntegerTy(), and llvm::TargetTransformInfo::TCC_Free.
InstructionCost PPCTTIImpl::getIntrinsicInstrCost | ( | const IntrinsicCostAttributes & | ICA, |
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 893 of file PPCTargetTransformInfo.cpp.
References CostKind, and llvm::BasicTTIImplBase< PPCTTIImpl >::getIntrinsicInstrCost().
unsigned PPCTTIImpl::getMaxInterleaveFactor | ( | ElementCount | VF | ) |
Definition at line 516 of file PPCTargetTransformInfo.cpp.
References llvm::PPC::DIR_440, llvm::PPC::DIR_A2, llvm::PPC::DIR_E500mc, llvm::PPC::DIR_E5500, llvm::PPC::DIR_PWR10, llvm::PPC::DIR_PWR11, llvm::PPC::DIR_PWR7, llvm::PPC::DIR_PWR8, llvm::PPC::DIR_PWR9, llvm::PPC::DIR_PWR_FUTURE, and llvm::PPCSubtarget::getCPUDirective().
InstructionCost PPCTTIImpl::getMemoryOpCost | ( | unsigned | Opcode, |
Type * | Src, | ||
MaybeAlign | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind, | ||
TTI::OperandValueInfo | OpInfo = {TTI::OK_AnyValue, TTI::OP_None} , |
||
const Instruction * | I = nullptr |
||
) |
Definition at line 763 of file PPCTargetTransformInfo.cpp.
References llvm::PPCTargetLowering::allowsMisalignedMemoryAccesses(), assert(), CostKind, llvm::BasicTTIImplBase< PPCTTIImpl >::DL, llvm::InstructionCost::getMax(), llvm::BasicTTIImplBase< PPCTTIImpl >::getMemoryOpCost(), llvm::BasicTTIImplBase< PPCTTIImpl >::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), getVectorInstrCost(), llvm::InstructionCost::isValid(), llvm::TargetTransformInfo::TCK_RecipThroughput, and vectorCostAdjustmentFactor().
Referenced by getInterleavedMemoryOpCost().
void PPCTTIImpl::getPeelingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::PeelingPreferences & | PP | ||
) |
Definition at line 414 of file PPCTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< PPCTTIImpl >::getPeelingPreferences().
TargetTransformInfo::PopcntSupportKind PPCTTIImpl::getPopcntSupport | ( | unsigned | TyWidth | ) |
Definition at line 56 of file PPCTargetTransformInfo.cpp.
References assert(), llvm::PPCSubtarget::hasPOPCNTD(), llvm::isPowerOf2_32(), llvm::PPCSubtarget::POPCNTD_Slow, llvm::PPCSubtarget::POPCNTD_Unavailable, llvm::TargetTransformInfo::PSK_FastHardware, llvm::TargetTransformInfo::PSK_SlowHardware, and llvm::TargetTransformInfo::PSK_Software.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< PPCTTIImpl >.
Definition at line 512 of file PPCTargetTransformInfo.cpp.
TypeSize PPCTTIImpl::getRegisterBitWidth | ( | TargetTransformInfo::RegisterKind | K | ) | const |
Definition at line 486 of file PPCTargetTransformInfo.cpp.
References llvm::TypeSize::getFixed(), llvm::TypeSize::getScalable(), llvm::PPCSubtarget::isPPC64(), llvm_unreachable, llvm::TargetTransformInfo::RGK_FixedWidthVector, llvm::TargetTransformInfo::RGK_ScalableVector, and llvm::TargetTransformInfo::RGK_Scalar.
Definition at line 457 of file PPCTargetTransformInfo.cpp.
References FPRRC, llvm::Type::getScalarType(), GPRRC, llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isFP128Ty(), llvm::Type::isHalfTy(), llvm::Type::isPPC_FP128Ty(), llvm::Vector, VRRC, and VSXRC.
Definition at line 472 of file PPCTargetTransformInfo.cpp.
References FPRRC, GPRRC, llvm_unreachable, VRRC, and VSXRC.
InstructionCost PPCTTIImpl::getShuffleCost | ( | TTI::ShuffleKind | Kind, |
Type * | Tp, | ||
ArrayRef< int > | Mask, | ||
TTI::TargetCostKind | CostKind, | ||
int | Index, | ||
Type * | SubTp, | ||
ArrayRef< const Value * > | Args = {} , |
||
const Instruction * | CxtI = nullptr |
||
) |
Definition at line 604 of file PPCTargetTransformInfo.cpp.
References llvm::InstructionCost::getMax(), llvm::BasicTTIImplBase< PPCTTIImpl >::getTypeLegalizationCost(), llvm::InstructionCost::isValid(), and vectorCostAdjustmentFactor().
bool PPCTTIImpl::getTgtMemIntrinsic | ( | IntrinsicInst * | Inst, |
MemIntrinsicInfo & | Info | ||
) |
Definition at line 965 of file PPCTargetTransformInfo.cpp.
References llvm::CallBase::getArgOperand(), llvm::IntrinsicInst::getIntrinsicID(), and Info.
void PPCTTIImpl::getUnrollingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::UnrollingPreferences & | UP, | ||
OptimizationRemarkEmitter * | ORE | ||
) |
Definition at line 398 of file PPCTargetTransformInfo.cpp.
References llvm::TargetTransformInfo::UnrollingPreferences::AllowExpensiveTripCount, llvm::PPC::DIR_A2, llvm::PPCSubtarget::getCPUDirective(), llvm::BasicTTIImplBase< PPCTTIImpl >::getUnrollingPreferences(), llvm::TargetTransformInfo::UnrollingPreferences::Partial, and llvm::TargetTransformInfo::UnrollingPreferences::Runtime.
InstructionCost PPCTTIImpl::getVectorInstrCost | ( | unsigned | Opcode, |
Type * | Val, | ||
TTI::TargetCostKind | CostKind, | ||
unsigned | Index, | ||
Value * | Op0, | ||
Value * | Op1 | ||
) |
Definition at line 673 of file PPCTargetTransformInfo.cpp.
References assert(), CostKind, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::InstructionCost::getMax(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< PPCTTIImpl >::getVectorInstrCost(), llvm::ISD::INSERT_VECTOR_ELT, llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::Type::isDoubleTy(), llvm::Type::isIntegerTy(), llvm::PPCSubtarget::isLittleEndian(), llvm::InstructionCost::isValid(), llvm::Type::isVectorTy(), VecMaskCost, and vectorCostAdjustmentFactor().
Referenced by getMemoryOpCost().
InstructionCost PPCTTIImpl::getVPMemoryOpCost | ( | unsigned | Opcode, |
Type * | Src, | ||
Align | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 1046 of file PPCTargetTransformInfo.cpp.
References assert(), CostKind, llvm::PPC::DIR_PWR9, llvm::BasicTTIImplBase< PPCTTIImpl >::DL, llvm::PPCSubtarget::getCPUDirective(), llvm::BasicTTIImplBase< PPCTTIImpl >::getMaskedMemoryOpCost(), llvm::InstructionCost::getMax(), llvm::BasicTTIImplBase< PPCTTIImpl >::getTypeLegalizationCost(), llvm::InstructionCost::getValue(), llvm::TargetLoweringBase::getValueType(), llvm::TargetTransformInfoImplBase::getVPMemoryOpCost(), hasActiveVectorLength(), I, llvm::InstructionCost::isValid(), llvm::TargetTransformInfo::TCK_RecipThroughput, llvm::Align::value(), and vectorCostAdjustmentFactor().
Definition at line 1018 of file PPCTargetTransformInfo.cpp.
References llvm::Type::getIntegerBitWidth(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::getScalarType(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), and llvm::PPCSubtarget::isPPC64().
Referenced by getVPMemoryOpCost().
std::optional< Instruction * > PPCTTIImpl::instCombineIntrinsic | ( | InstCombiner & | IC, |
IntrinsicInst & | II | ||
) | const |
Definition at line 65 of file PPCTargetTransformInfo.cpp.
References assert(), llvm::InstCombiner::Builder, llvm::CastInst::Create(), llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateInsertElement(), llvm::BasicTTIImplBase< PPCTTIImpl >::DL, llvm::UndefValue::get(), llvm::InstCombiner::getAssumptionCache(), llvm::InstCombiner::getDataLayout(), llvm::InstCombiner::getDominatorTree(), llvm::IRBuilderBase::getInt32(), llvm::getOrEnforceKnownAlignment(), llvm::Value::getType(), Idx, II, llvm::DataLayout::isLittleEndian(), and Ptr.
bool PPCTTIImpl::isHardwareLoopProfitable | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
AssumptionCache & | AC, | ||
TargetLibraryInfo * | LibInfo, | ||
HardwareLoopInfo & | HWLoopInfo | ||
) |
Definition at line 338 of file PPCTargetTransformInfo.cpp.
References llvm::CallingConv::C, llvm::CodeMetrics::collectEphemeralValues(), llvm::HardwareLoopInfo::CountType, llvm::extractBranchWeights(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::TargetSchedModel::getIssueWidth(), llvm::ScalarEvolution::getSmallConstantTripCount(), llvm::PPCSubtarget::getTargetMachine(), I, llvm::TargetSchedModel::init(), llvm::HardwareLoopInfo::LoopDecrement, Metrics, and SmallCTRLoopThreshold.
Referenced by canSaveCmp().
bool PPCTTIImpl::isLSRCostLess | ( | const TargetTransformInfo::LSRCost & | C1, |
const TargetTransformInfo::LSRCost & | C2 | ||
) |
Definition at line 940 of file PPCTargetTransformInfo.cpp.
References llvm::TargetTransformInfo::LSRCost::AddRecCost, llvm::TargetTransformInfo::LSRCost::ImmCost, llvm::TargetTransformInfo::LSRCost::Insns, llvm::TargetTransformInfoImplBase::isLSRCostLess(), LsrNoInsnsCost, llvm::TargetTransformInfo::LSRCost::NumBaseAdds, llvm::TargetTransformInfo::LSRCost::NumIVMuls, llvm::TargetTransformInfo::LSRCost::NumRegs, llvm::TargetTransformInfo::LSRCost::ScaleCost, and llvm::TargetTransformInfo::LSRCost::SetupCost.
bool PPCTTIImpl::isNumRegsMajorCostOfLSR | ( | ) |
Definition at line 953 of file PPCTargetTransformInfo.cpp.
bool PPCTTIImpl::shouldBuildRelLookupTables | ( | ) | const |
Definition at line 957 of file PPCTargetTransformInfo.cpp.
References llvm::PPCSubtarget::getTargetMachine(), and llvm::BasicTTIImplBase< PPCTTIImpl >::shouldBuildRelLookupTables().
Definition at line 1100 of file PPCTargetTransformInfo.cpp.
References llvm::PPCTargetLowering::supportsTailCallFor().
Definition at line 422 of file PPCTargetTransformInfo.cpp.
References EnablePPCColdCC.
InstructionCost PPCTTIImpl::vectorCostAdjustmentFactor | ( | unsigned | Opcode, |
Type * | Ty1, | ||
Type * | Ty2 | ||
) |
Definition at line 551 of file PPCTargetTransformInfo.cpp.
References llvm::InstructionCost::getInvalid(), llvm::BasicTTIImplBase< PPCTTIImpl >::getTypeLegalizationCost(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), isMMAType(), llvm::TargetLoweringBase::isOperationExpand(), and llvm::Type::isVectorTy().
Referenced by getArithmeticInstrCost(), getCastInstrCost(), getCmpSelInstrCost(), getInterleavedMemoryOpCost(), getMemoryOpCost(), getShuffleCost(), getVectorInstrCost(), and getVPMemoryOpCost().