Lines Matching defs:TargetTransformInfo

1 //===- llvm/Analysis/TargetTransformInfo.cpp ------------------------------===//
9 #include "llvm/Analysis/TargetTransformInfo.h"
136 TargetTransformInfo::TargetTransformInfo(const DataLayout &DL)
139 TargetTransformInfo::~TargetTransformInfo() {}
141 TargetTransformInfo::TargetTransformInfo(TargetTransformInfo &&Arg)
144 TargetTransformInfo &TargetTransformInfo::operator=(TargetTransformInfo &&RHS) {
149 int TargetTransformInfo::getOperationCost(unsigned Opcode, Type *Ty,
156 int TargetTransformInfo::getCallCost(FunctionType *FTy, int NumArgs,
163 int TargetTransformInfo::getCallCost(const Function *F,
171 unsigned TargetTransformInfo::getInliningThresholdMultiplier() const {
175 int TargetTransformInfo::getInlinerVectorBonusPercent() const {
179 int TargetTransformInfo::getGEPCost(Type *PointeeType, const Value *Ptr,
184 int TargetTransformInfo::getExtCost(const Instruction *I,
189 int TargetTransformInfo::getIntrinsicCost(
198 TargetTransformInfo::getEstimatedNumberOfCaseClusters(
204 int TargetTransformInfo::getUserCost(const User *U,
211 bool TargetTransformInfo::hasBranchDivergence() const {
215 bool TargetTransformInfo::isSourceOfDivergence(const Value *V) const {
219 bool llvm::TargetTransformInfo::isAlwaysUniform(const Value *V) const {
223 unsigned TargetTransformInfo::getFlatAddressSpace() const {
227 bool TargetTransformInfo::collectFlatAddressOperands(
232 bool TargetTransformInfo::rewriteIntrinsicWithAddressSpace(
237 bool TargetTransformInfo::isLoweredToCall(const Function *F) const {
241 bool TargetTransformInfo::isHardwareLoopProfitable(
247 bool TargetTransformInfo::preferPredicateOverEpilogue(Loop *L, LoopInfo *LI,
253 void TargetTransformInfo::getUnrollingPreferences(
258 bool TargetTransformInfo::isLegalAddImmediate(int64_t Imm) const {
262 bool TargetTransformInfo::isLegalICmpImmediate(int64_t Imm) const {
266 bool TargetTransformInfo::isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
276 bool TargetTransformInfo::isLSRCostLess(LSRCost &C1, LSRCost &C2) const {
280 bool TargetTransformInfo::canMacroFuseCmp() const {
284 bool TargetTransformInfo::canSaveCmp(Loop *L, BranchInst **BI,
291 bool TargetTransformInfo::shouldFavorPostInc() const {
295 bool TargetTransformInfo::shouldFavorBackedgeIndex(const Loop *L) const {
299 bool TargetTransformInfo::isLegalMaskedStore(Type *DataType,
304 bool TargetTransformInfo::isLegalMaskedLoad(Type *DataType,
309 bool TargetTransformInfo::isLegalNTStore(Type *DataType,
314 bool TargetTransformInfo::isLegalNTLoad(Type *DataType, Align Alignment) const {
318 bool TargetTransformInfo::isLegalMaskedGather(Type *DataType,
323 bool TargetTransformInfo::isLegalMaskedScatter(Type *DataType,
328 bool TargetTransformInfo::isLegalMaskedCompressStore(Type *DataType) const {
332 bool TargetTransformInfo::isLegalMaskedExpandLoad(Type *DataType) const {
336 bool TargetTransformInfo::hasDivRemOp(Type *DataType, bool IsSigned) const {
340 bool TargetTransformInfo::hasVolatileVariant(Instruction *I,
345 bool TargetTransformInfo::prefersVectorizedAddressing() const {
349 int TargetTransformInfo::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
360 bool TargetTransformInfo::LSRWithInstrQueries() const {
364 bool TargetTransformInfo::isTruncateFree(Type *Ty1, Type *Ty2) const {
368 bool TargetTransformInfo::isProfitableToHoist(Instruction *I) const {
372 bool TargetTransformInfo::useAA() const { return TTIImpl->useAA(); }
374 bool TargetTransformInfo::isTypeLegal(Type *Ty) const {
378 bool TargetTransformInfo::shouldBuildLookupTables() const {
381 bool TargetTransformInfo::shouldBuildLookupTablesForConstant(Constant *C) const {
385 bool TargetTransformInfo::useColdCCForColdCall(Function &F) const {
389 unsigned TargetTransformInfo::
394 unsigned TargetTransformInfo::
400 bool TargetTransformInfo::supportsEfficientVectorElementLoadStore() const {
404 bool TargetTransformInfo::enableAggressiveInterleaving(bool LoopHasReductions) const {
408 TargetTransformInfo::MemCmpExpansionOptions
409 TargetTransformInfo::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const {
413 bool TargetTransformInfo::enableInterleavedAccessVectorization() const {
417 bool TargetTransformInfo::enableMaskedInterleavedAccessVectorization() const {
421 bool TargetTransformInfo::isFPVectorizationPotentiallyUnsafe() const {
425 bool TargetTransformInfo::allowsMisalignedMemoryAccesses(LLVMContext &Context,
434 TargetTransformInfo::PopcntSupportKind
435 TargetTransformInfo::getPopcntSupport(unsigned IntTyWidthInBit) const {
439 bool TargetTransformInfo::haveFastSqrt(Type *Ty) const {
443 bool TargetTransformInfo::isFCmpOrdCheaperThanFCmpZero(Type *Ty) const {
447 int TargetTransformInfo::getFPOpCost(Type *Ty) const {
453 int TargetTransformInfo::getIntImmCodeSizeCost(unsigned Opcode, unsigned Idx,
461 int TargetTransformInfo::getIntImmCost(const APInt &Imm, Type *Ty) const {
467 int TargetTransformInfo::getIntImmCostInst(unsigned Opcode, unsigned Idx,
474 int TargetTransformInfo::getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx,
481 unsigned TargetTransformInfo::getNumberOfRegisters(unsigned ClassID) const {
485 unsigned TargetTransformInfo::getRegisterClassForType(bool Vector, Type *Ty) const {
489 const char* TargetTransformInfo::getRegisterClassName(unsigned ClassID) const {
493 unsigned TargetTransformInfo::getRegisterBitWidth(bool Vector) const {
497 unsigned TargetTransformInfo::getMinVectorRegisterBitWidth() const {
501 bool TargetTransformInfo::shouldMaximizeVectorBandwidth(bool OptSize) const {
505 unsigned TargetTransformInfo::getMinimumVF(unsigned ElemWidth) const {
509 bool TargetTransformInfo::shouldConsiderAddressTypePromotion(
515 unsigned TargetTransformInfo::getCacheLineSize() const {
519 llvm::Optional<unsigned> TargetTransformInfo::getCacheSize(CacheLevel Level)
524 llvm::Optional<unsigned> TargetTransformInfo::getCacheAssociativity(
529 unsigned TargetTransformInfo::getPrefetchDistance() const {
533 unsigned TargetTransformInfo::getMinPrefetchStride() const {
537 unsigned TargetTransformInfo::getMaxPrefetchIterationsAhead() const {
541 unsigned TargetTransformInfo::getMaxInterleaveFactor(unsigned VF) const {
545 TargetTransformInfo::OperandValueKind
546 TargetTransformInfo::getOperandInfo(Value *V, OperandValueProperties &OpProps) {
594 int TargetTransformInfo::getArithmeticInstrCost(
605 int TargetTransformInfo::getShuffleCost(ShuffleKind Kind, Type *Ty, int Index,
612 int TargetTransformInfo::getCastInstrCost(unsigned Opcode, Type *Dst,
621 int TargetTransformInfo::getExtractWithExtendCost(unsigned Opcode, Type *Dst,
629 int TargetTransformInfo::getCFInstrCost(unsigned Opcode) const {
635 int TargetTransformInfo::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
644 int TargetTransformInfo::getVectorInstrCost(unsigned Opcode, Type *Val,
651 int TargetTransformInfo::getMemoryOpCost(unsigned Opcode, Type *Src,
662 int TargetTransformInfo::getMaskedMemoryOpCost(unsigned Opcode, Type *Src,
671 int TargetTransformInfo::getGatherScatterOpCost(unsigned Opcode, Type *DataTy,
680 int TargetTransformInfo::getInterleavedMemoryOpCost(
692 int TargetTransformInfo::getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy,
701 int TargetTransformInfo::getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy,
708 int TargetTransformInfo::getCallInstrCost(Function *F, Type *RetTy,
715 unsigned TargetTransformInfo::getNumberOfParts(Type *Tp) const {
719 int TargetTransformInfo::getAddressComputationCost(Type *Tp,
727 int TargetTransformInfo::getMemcpyCost(const Instruction *I) const {
733 int TargetTransformInfo::getArithmeticReductionCost(unsigned Opcode, Type *Ty,
740 int TargetTransformInfo::getMinMaxReductionCost(Type *Ty, Type *CondTy,
750 TargetTransformInfo::getCostOfKeepingLiveOverCall(ArrayRef<Type *> Tys) const {
754 bool TargetTransformInfo::getTgtMemIntrinsic(IntrinsicInst *Inst,
759 unsigned TargetTransformInfo::getAtomicMemIntrinsicMaxElementSize() const {
763 Value *TargetTransformInfo::getOrCreateResultFromMemIntrinsic(
768 Type *TargetTransformInfo::getMemcpyLoopLoweringType(LLVMContext &Context,
776 void TargetTransformInfo::getMemcpyLoopResidualLoweringType(
783 bool TargetTransformInfo::areInlineCompatible(const Function *Caller,
788 bool TargetTransformInfo::areFunctionArgsABICompatible(
794 bool TargetTransformInfo::isIndexedLoadLegal(MemIndexedMode Mode,
799 bool TargetTransformInfo::isIndexedStoreLegal(MemIndexedMode Mode,
804 unsigned TargetTransformInfo::getLoadStoreVecRegBitWidth(unsigned AS) const {
808 bool TargetTransformInfo::isLegalToVectorizeLoad(LoadInst *LI) const {
812 bool TargetTransformInfo::isLegalToVectorizeStore(StoreInst *SI) const {
816 bool TargetTransformInfo::isLegalToVectorizeLoadChain(
822 bool TargetTransformInfo::isLegalToVectorizeStoreChain(
828 unsigned TargetTransformInfo::getLoadVectorFactor(unsigned VF,
835 unsigned TargetTransformInfo::getStoreVectorFactor(unsigned VF,
842 bool TargetTransformInfo::useReductionIntrinsic(unsigned Opcode,
847 bool TargetTransformInfo::shouldExpandReduction(const IntrinsicInst *II) const {
851 unsigned TargetTransformInfo::getGISelRematGlobalCost() const {
855 int TargetTransformInfo::getInstructionLatency(const Instruction *I) const {
1154 int TargetTransformInfo::getInstructionThroughput(const Instruction *I) const {
1182 TargetTransformInfo::OperandValueKind Op1VK, Op2VK;
1183 TargetTransformInfo::OperandValueProperties Op1VP, Op2VP;
1191 TargetTransformInfo::OperandValueKind Op1VK, Op2VK;
1192 TargetTransformInfo::OperandValueProperties Op1VP, Op2VP;
1348 TargetTransformInfo::Concept::~Concept() {}
1387 TargetTransformInfo &TargetTransformInfoWrapperPass::getTTI(const Function &F) {