/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | TargetTransformInfo.cpp | 270 InstructionCost Cost = TTIImpl->getInstructionCost(U, Operands, CostKind); in getInstructionCost() local 271 assert((CostKind == TTI::TCK_RecipThroughput || Cost >= 0) && in getInstructionCost() 273 return Cost; in getInstructionCost() 549 InstructionCost Cost = TTIImpl->getScalingFactorCost( in getScalingFactorCost() local 551 assert(Cost >= 0 && "TTI should not produce negative costs!"); in getScalingFactorCost() 552 return Cost; in getScalingFactorCost() 679 InstructionCost Cost = TTIImpl->getFPOpCost(Ty); in getFPOpCost() local 680 assert(Cost >= 0 && "TTI should not produce negative costs!"); in getFPOpCost() 681 return Cost; in getFPOpCost() 688 InstructionCost Cost = TTIImpl->getIntImmCodeSizeCost(Opcode, Idx, Imm, Ty); in getIntImmCodeSizeCost() local [all …]
|
H A D | InlineOrder.cpp | 25 enum class InlinePriorityMode : int { Size, Cost, CostBenefit, ML }; enumerator 32 clEnumValN(InlinePriorityMode::Cost, "cost", 98 Cost = IC.getCost(); in CostPriority() 100 Cost = IC.isNever() ? INT_MAX : INT_MIN; in CostPriority() 104 return P1.Cost < P2.Cost; in isMoreDesirable() 108 int Cost = INT_MAX; member in __anona7cbcc7e0111::CostPriority 118 Cost = IC.getCost(); in CostBenefitPriority() 120 Cost = IC.isNever() ? INT_MAX : INT_MIN; in CostBenefitPriority() 143 P1.Cost + P1.StaticBonusApplied < ModuleInlinerTopPriorityThreshold; in isMoreDesirable() 145 P2.Cost + P2.StaticBonusApplied < ModuleInlinerTopPriorityThreshold; in isMoreDesirable() [all …]
|
H A D | CostModel.cpp | 1 //===- CostModel.cpp ------ Cost Model Analysis ---------------------------===// 53 OS << "Printing analysis 'Cost Model Analysis' for function '" << F.getName() << "':\n"; 58 InstructionCost Cost; in CostModelAnalysis() 63 Cost = TTI.getIntrinsicInstrCost(ICA, CostKind); 66 Cost = TTI.getInstructionCost(&Inst, CostKind); 69 if (auto CostVal = Cost.getValue()) 70 OS << "Cost Model: Found an estimated cost of " << *CostVal; 72 OS << "Cost Model: Invalid cost"; 102 InstructionCost Cost; print() local 131 InstructionCost Cost; run() local
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | InlineCost.h | 68 CostBenefitPair(APInt Cost, APInt Benefit) in CostBenefitPair() argument 69 : Cost(std::move(Cost)), Benefit(std::move(Benefit)) {} in CostBenefitPair() 71 const APInt &getCost() const { return Cost; } in getCost() 76 APInt Cost; 94 int Cost = 0; variable 109 InlineCost(int Cost, int Threshold, int StaticBonusApplied, 112 : Cost(Cost), Threshold(Threshold), in Cost() argument 120 static InlineCost get(int Cost, int Threshold, int StaticBonus = 0) { 121 assert(Cost > AlwaysInlineCost && "Cost crosses sentinel value"); 122 assert(Cost < NeverInlineCost && "Cost crosses sentinel value"); [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
H A D | RegBankSelect.cpp | 279 unsigned Cost = RBI->copyCost(*DesiredRegBank, *CurRegBank, in getRepairCost() local 282 if (Cost != std::numeric_limits<unsigned>::max()) in getRepairCost() 283 return Cost; in getRepairCost() 296 MappingCost Cost = MappingCost::ImpossibleCost(); in findBestMapping() local 301 computeMapping(MI, *CurMapping, LocalRepairPts, &Cost); in findBestMapping() 302 if (CurCost < Cost) { in findBestMapping() 304 Cost = CurCost; in findBestMapping() 453 MappingCost Cost(MBFI ? MBFI->getBlockFreq(MI.getParent()) in computeMapping() local 455 bool Saturated = Cost.addLocalCost(InstrMapping.getCost()); in computeMapping() 460 if (BestCost && Cost > *BestCost) { in computeMapping() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | BasicTTIImpl.h | 93 InstructionCost Cost = 0; in getBroadcastShuffleOverhead() local 96 Cost += thisT()->getVectorInstrCost(Instruction::ExtractElement, VTy, in getBroadcastShuffleOverhead() 100 Cost += thisT()->getVectorInstrCost(Instruction::InsertElement, VTy, in getBroadcastShuffleOverhead() 103 return Cost; in getBroadcastShuffleOverhead() 110 InstructionCost Cost = 0; in getPermuteShuffleOverhead() local 119 Cost += thisT()->getVectorInstrCost(Instruction::InsertElement, VTy, in getPermuteShuffleOverhead() 121 Cost += thisT()->getVectorInstrCost(Instruction::ExtractElement, VTy, in getPermuteShuffleOverhead() 124 return Cost; in getPermuteShuffleOverhead() 141 InstructionCost Cost = 0; in getExtractSubvectorOverhead() local 146 Cost += in getExtractSubvectorOverhead() [all …]
|
H A D | RegisterBankInfo.h | 198 unsigned Cost = 0; variable 218 InstructionMapping(unsigned ID, unsigned Cost, in InstructionMapping() argument 221 : ID(ID), Cost(Cost), OperandsMapping(OperandsMapping), in InstructionMapping() 229 unsigned getCost() const { return Cost; } in getCost() 527 unsigned Cost = 0, 534 getInstructionMapping(unsigned ID, unsigned Cost, in getInstructionMapping() argument 537 return getInstructionMappingImpl(/*IsInvalid*/ false, ID, Cost, in getInstructionMapping()
|
/freebsd/contrib/llvm-project/llvm/utils/TableGen/ |
H A D | DAGISelEmitter.cpp | 49 unsigned Cost = 0; in getResultPatternCost() local 52 Cost++; in getResultPatternCost() 55 Cost += 10; in getResultPatternCost() 58 Cost += getResultPatternCost(P.getChild(i), CGP); in getResultPatternCost() 59 return Cost; in getResultPatternCost() 69 unsigned Cost = 0; in getResultPatternSize() local 72 Cost += Op->getValueAsInt("CodeSize"); in getResultPatternSize() 75 Cost += getResultPatternSize(P.getChild(i), CGP); in getResultPatternSize() 76 return Cost; in getResultPatternSize()
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-mca/Views/ |
H A D | BottleneckAnalysis.cpp | 165 OS << " - COST: " << DE.Cost << '\n'; in dumpDependencyEdge() 241 uint64_t Cost = N.Cost + DepEdge.Dep.Cost; in propagateThroughEdges() local 245 if (Cost > To.Cost) { in propagateThroughEdges() 247 To.Cost = Cost; in propagateThroughEdges() 275 return Lhs.Cost < Rhs.Cost; in getCriticalSequence() 433 It->Dep.Cost += Dep.Cost; in addDependency() 454 unsigned RegID, unsigned Cost) { in addRegisterDep() argument 458 DG.addRegisterDep(From, To + SourceSize, RegID, Cost); in addRegisterDep() 459 DG.addRegisterDep(From + SourceSize, To + (SourceSize * 2), RegID, Cost); in addRegisterDep() 462 DG.addRegisterDep(From + SourceSize, To + SourceSize, RegID, Cost); in addRegisterDep() [all …]
|
H A D | BottleneckAnalysis.h | 190 uint64_t Cost; member 227 uint64_t Cost; member 255 unsigned Cost) { in addRegisterDep() argument 256 addDependency(From, To, {DependencyEdge::DT_REGISTER, RegID, Cost}); in addRegisterDep() 259 void addMemoryDep(unsigned From, unsigned To, unsigned Cost) { in addMemoryDep() argument 260 addDependency(From, To, {DependencyEdge::DT_MEMORY, /* unused */ 0, Cost}); in addMemoryDep() 264 unsigned Cost) { in addResourceDep() argument 265 addDependency(From, To, {DependencyEdge::DT_RESOURCE, Mask, Cost}); in addResourceDep()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
H A D | PPCTargetTransformInfo.cpp | 601 InstructionCost Cost = BaseT::getArithmeticInstrCost( in getArithmeticInstrCost() local 603 return Cost * CostFactor; in getArithmeticInstrCost() 649 InstructionCost Cost = in getCastInstrCost() local 651 Cost *= CostFactor; in getCastInstrCost() 654 return Cost == 0 ? 0 : 1; in getCastInstrCost() 655 return Cost; in getCastInstrCost() 668 InstructionCost Cost = in getCmpSelInstrCost() local 672 return Cost; in getCmpSelInstrCost() 673 return Cost * CostFactor; in getCmpSelInstrCost() 689 InstructionCost Cost = in getVectorInstrCost() local [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ |
H A D | FunctionSpecialization.h | 27 // Cost Model: 95 using Cost = InstructionCost; in hash_value() 149 Bonus(Cost CodeSize, Cost Latency) { 155 // cannot be negative and Cost is of type int64_t. 216 Cost estimateBasicBlocks(SmallVectorImpl<BasicBlock *> &WorkList); 217 Cost estimateSwitchInst(SwitchInst &I); 218 Cost estimateBranchInst(BranchInst &I); 311 /// @param FuncSize Cost of specializing a function. 71 using Cost = InstructionCost; global() variable
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/ |
H A D | RegBankSelect.h | 28 /// is: Cost of I on RegBank plus the sum of the cost for bringing the 424 /// Cost of the local instructions. 427 /// Cost of the non-local instructions. 445 /// Add \p Cost to the local cost. 447 bool addLocalCost(uint64_t Cost); 449 /// Add \p Cost to the non-local cost. 452 bool addNonLocalCost(uint64_t Cost); 461 /// Check if this is less than \p Cost. 462 bool operator<(const MappingCost &Cost) const; 463 /// Check if this is equal to \p Cost [all...] |
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/ |
H A D | SystemZTargetTransformInfo.cpp | 572 InstructionCost Cost = in getArithmeticInstrCost() local 578 Cost *= 2; in getArithmeticInstrCost() 579 return Cost; in getArithmeticInstrCost() 592 InstructionCost Cost = (VF * LIBCALL_COST) + in getArithmeticInstrCost() local 596 Cost *= 2; in getArithmeticInstrCost() 597 return Cost; in getArithmeticInstrCost() 679 unsigned Cost = 0; in getVectorTruncCost() local 685 Cost += NumParts; in getVectorTruncCost() 693 Cost--; in getVectorTruncCost() 695 return Cost; in getVectorTruncCost() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
H A D | WebAssemblyTargetTransformInfo.cpp | 59 InstructionCost Cost = in getArithmeticInstrCost() local 72 Cost = in getArithmeticInstrCost() 80 return Cost; in getArithmeticInstrCost() 87 InstructionCost Cost = BasicTTIImplBase::getVectorInstrCost( in getVectorInstrCost() local 92 return Cost + 25 * TargetTransformInfo::TCC_Expensive; in getVectorInstrCost() 94 return Cost; in getVectorInstrCost()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | RegisterClassInfo.cpp | 149 uint8_t Cost = RegCosts[PhysReg]; in compute() local 150 MinCost = std::min(MinCost, Cost); in compute() 157 if (Cost != LastCost) in compute() 160 LastCost = Cost; in compute() 168 uint8_t Cost = RegCosts[PhysReg]; in compute() local 169 if (Cost != LastCost) in compute() 172 LastCost = Cost; in compute()
|
H A D | RegAllocEvictionAdvisor.cpp | 204 EvictionCost Cost; in canEvictInterferenceBasedOnCost() local 248 Cost.BrokenHints += 10; in canEvictInterferenceBasedOnCost() 253 Cost.BrokenHints += BreaksHint; in canEvictInterferenceBasedOnCost() 254 Cost.MaxWeight = std::max(Cost.MaxWeight, Intf->weight()); in canEvictInterferenceBasedOnCost() 256 if (!(Cost < MaxCost)) in canEvictInterferenceBasedOnCost() 272 MaxCost = Cost; in canEvictInterferenceBasedOnCost()
|
H A D | MachineLICM.cpp | 244 bool CanCauseHighRegPressure(const DenseMap<unsigned, int> &Cost, 926 auto Cost = calcRegisterCost(MI, /*ConsiderSeen=*/true, ConsiderUnseenAsDef); in UpdateRegPressure() local 927 for (const auto &RPIdAndCost : Cost) { in UpdateRegPressure() 945 DenseMap<unsigned, int> Cost; in calcRegisterCost() local 947 return Cost; in calcRegisterCost() 976 if (!Cost.contains(*PS)) in calcRegisterCost() 977 Cost[*PS] = RCCost; in calcRegisterCost() 979 Cost[*PS] += RCCost; in calcRegisterCost() 982 return Cost; in calcRegisterCost() 1213 MachineLICMBase::CanCauseHighRegPressure(const DenseMap<unsigned, int>& Cost, in CanCauseHighRegPressure() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
H A D | X86TargetTransformInfo.cpp | 81 unsigned Cost = ~0U; in operator []() local 84 Cost = RecipThroughputCost; in operator []() 87 Cost = LatencyCost; in operator []() 90 Cost = CodeSizeCost; in operator []() 93 Cost = SizeAndLatencyCost; in operator []() 96 if (Cost == ~0U) in operator []() 98 return Cost; in operator []() 330 InstructionCost Cost = in getArithmeticInstrCost() local 334 Cost += getArithmeticInstrCost(Instruction::Sub, Ty, CostKind); in getArithmeticInstrCost() 335 return Cost; in getArithmeticInstrCost() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPUSplitModule.cpp | 237 auto Cost = in calculateFunctionCosts() local 239 assert(Cost != InstructionCost::getMax()); in calculateFunctionCosts() 242 Cost.getValue().value_or(TargetTransformInfo::TCC_Expensive); in calculateFunctionCosts() 500 for (auto &[QueuePID, Cost] : reverse(BalancingQueue)) { in doPartitioning() 506 SML << "[Updating P" << PID << " Cost]:" << Cost << " -> " << NewCost; in doPartitioning() 507 if (Cost) { in doPartitioning() 508 SML << " (" << unsigned(((float(NewCost) / Cost) - 1) * 100) in doPartitioning() 513 Cost = NewCost; in doPartitioning() 572 CostType Cost = 0; in doPartitioning() local 574 Cost += FnCosts.at(Fn); in doPartitioning() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/ |
H A D | RISCVTargetTransformInfo.cpp | 51 InstructionCost Cost = 0; in getRISCVInstructionCost() local 55 Cost += TLI->getVRGatherVICost(VT); in getRISCVInstructionCost() 58 Cost += TLI->getVRGatherVVCost(VT); in getRISCVInstructionCost() 62 Cost += TLI->getVSlideVICost(VT); in getRISCVInstructionCost() 66 Cost += TLI->getVSlideVXCost(VT); in getRISCVInstructionCost() 82 Cost += Log2_32_Ceil(VL); in getRISCVInstructionCost() 89 Cost += VL; in getRISCVInstructionCost() 103 Cost += 1; in getRISCVInstructionCost() 106 Cost += LMULCost; in getRISCVInstructionCost() 109 return Cost; in getRISCVInstructionCost() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
H A D | HexagonTargetTransformInfo.cpp | 202 unsigned Cost = in getMemoryOpCost() local 210 return Cost * NumLoads; in getMemoryOpCost() 214 return (3 - LogA) * Cost * NumLoads; in getMemoryOpCost() 311 InstructionCost Cost = in getCastInstrCost() local 315 return Cost == 0 ? 0 : 1; in getCastInstrCost() 316 return Cost; in getCastInstrCost() 329 unsigned Cost = (Index != 0) ? 2 : 0; in getVectorInstrCost() local 331 return Cost; in getVectorInstrCost() 333 return Cost + getVectorInstrCost(Instruction::ExtractElement, Val, CostKind, in getVectorInstrCost()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | ConstantHoisting.cpp | 371 InstructionCost Cost; in collectConstantCandidates() local 375 Cost = TTI->getIntImmCostIntrin(IntrInst->getIntrinsicID(), Idx, in collectConstantCandidates() 379 Cost = TTI->getIntImmCostInst( in collectConstantCandidates() 384 if (Cost > TargetTransformInfo::TCC_Basic) { in collectConstantCandidates() 393 ConstIntCandVec[Itr->second].addUser(Inst, Idx, *Cost.getValue()); in collectConstantCandidates() 396 << " with cost " << Cost << '\n'; in collectConstantCandidates() 399 << *Inst->getOperand(Idx) << " with cost " << Cost in collectConstantCandidates() 439 InstructionCost Cost = in collectConstantCandidates() local 453 ExprCandVec[Itr->second].addUser(Inst, Idx, *Cost.getValue()); in collectConstantCandidates() 598 InstructionCost Cost = 0; in maximizeConstantsInRange() local [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/MCA/HardwareUnits/ |
H A D | RegisterFile.cpp | 180 IPC = std::make_pair(RegisterFileIndex, RCE.Cost); in addRegisterFile() 201 unsigned Cost = Entry.IndexPlusCost.second; in allocatePhysRegs() local 204 RMT.NumUsedPhysRegs += Cost; in allocatePhysRegs() 205 UsedPhysRegs[RegisterFileIndex] += Cost; in allocatePhysRegs() 209 RegisterFiles[0].NumUsedPhysRegs += Cost; in allocatePhysRegs() 210 UsedPhysRegs[0] += Cost; in allocatePhysRegs() 216 unsigned Cost = Entry.IndexPlusCost.second; in freePhysRegs() local 219 RMT.NumUsedPhysRegs -= Cost; in freePhysRegs() 220 FreedPhysRegs[RegisterFileIndex] += Cost; in freePhysRegs() 224 RegisterFiles[0].NumUsedPhysRegs -= Cost; in freePhysRegs() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
H A D | ARMTargetTransformInfo.cpp | 487 auto AdjustCost = [&CostKind](InstructionCost Cost) -> InstructionCost { in getCastInstrCost() argument 489 return Cost == 0 ? 0 : 1; in getCastInstrCost() 490 return Cost; in getCastInstrCost() 538 return AdjustCost(Entry->Cost); in getCastInstrCost() 561 return Entry->Cost * ST->getMVEVectorCostFactor(CostKind); in getCastInstrCost() 573 return Entry->Cost * ST->getMVEVectorCostFactor(CostKind); in getCastInstrCost() 590 return Entry->Cost * ST->getMVEVectorCostFactor(CostKind); in getCastInstrCost() 601 return Entry->Cost * ST->getMVEVectorCostFactor(CostKind); in getCastInstrCost() 628 return AdjustCost(Entry->Cost); in getCastInstrCost() 646 return AdjustCost(LT.first * Entry->Cost); in getCastInstrCost() [all …]
|