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 895 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 914 of file PPCTargetTransformInfo.cpp.
References llvm::HardwareLoopInfo::canAnalyze(), canSaveCmp(), llvm::HardwareLoopInfo::ExitBranch, I, llvm::HardwareLoopInfo::isHardwareLoopCandidate(), and isHardwareLoopProfitable().
Referenced by canSaveCmp().
Definition at line 428 of file PPCTargetTransformInfo.cpp.
References llvm::PPC::DIR_A2, and llvm::PPCSubtarget::getCPUDirective().
bool PPCTTIImpl::enableInterleavedAccessVectorization | ( | ) |
Definition at line 444 of file PPCTargetTransformInfo.cpp.
PPCTTIImpl::TTI::MemCmpExpansionOptions PPCTTIImpl::enableMemCmpExpansion | ( | bool | OptSize, |
bool | IsZeroCmp | ||
) | const |
Definition at line 437 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 = std::nullopt , |
||
const Instruction * | CxtI = nullptr |
||
) |
Definition at line 584 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 501 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 638 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 629 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, | ||
const Instruction * | I = nullptr |
||
) |
InstructionCost PPCTTIImpl::getInstructionCost | ( | const User * | U, |
ArrayRef< const Value * > | Operands, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 323 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 855 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 165 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 230 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 195 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 890 of file PPCTargetTransformInfo.cpp.
References CostKind, and llvm::BasicTTIImplBase< PPCTTIImpl >::getIntrinsicInstrCost().
unsigned PPCTTIImpl::getMaxInterleaveFactor | ( | ElementCount | VF | ) |
Definition at line 518 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 766 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(), if(), 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 416 of file PPCTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< PPCTTIImpl >::getPeelingPreferences().
TargetTransformInfo::PopcntSupportKind PPCTTIImpl::getPopcntSupport | ( | unsigned | TyWidth | ) |
Definition at line 58 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 514 of file PPCTargetTransformInfo.cpp.
TypeSize PPCTTIImpl::getRegisterBitWidth | ( | TargetTransformInfo::RegisterKind | K | ) | const |
Definition at line 488 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 459 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 474 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 = std::nullopt , |
||
const Instruction * | CxtI = nullptr |
||
) |
Definition at line 606 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 962 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 400 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 676 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 1043 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 1015 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 67 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 340 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 937 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 950 of file PPCTargetTransformInfo.cpp.
bool PPCTTIImpl::shouldBuildRelLookupTables | ( | ) | const |
Definition at line 954 of file PPCTargetTransformInfo.cpp.
References llvm::PPCSubtarget::getTargetMachine(), and llvm::BasicTTIImplBase< PPCTTIImpl >::shouldBuildRelLookupTables().
Definition at line 1097 of file PPCTargetTransformInfo.cpp.
References llvm::PPCTargetLowering::supportsTailCallFor().
Definition at line 424 of file PPCTargetTransformInfo.cpp.
References EnablePPCColdCC.
InstructionCost PPCTTIImpl::vectorCostAdjustmentFactor | ( | unsigned | Opcode, |
Type * | Ty1, | ||
Type * | Ty2 | ||
) |
Definition at line 553 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().