Home
last modified time | relevance | path

Searched refs:Cost (Results 1 – 25 of 124) sorted by relevance

12345

/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DTargetTransformInfo.cpp276 InstructionCost Cost = TTIImpl->getInstructionCost(U, Operands, CostKind); in getInstructionCost() local
277 assert((CostKind == TTI::TCK_RecipThroughput || Cost >= 0) && in getInstructionCost()
279 return Cost; in getInstructionCost()
566 InstructionCost Cost = TTIImpl->getScalingFactorCost( in getScalingFactorCost() local
568 assert(Cost >= 0 && "TTI should not produce negative costs!"); in getScalingFactorCost()
569 return Cost; in getScalingFactorCost()
717 InstructionCost Cost = TTIImpl->getFPOpCost(Ty); in getFPOpCost() local
718 assert(Cost >= 0 && "TTI should not produce negative costs!"); in getFPOpCost()
719 return Cost; in getFPOpCost()
726 InstructionCost Cost = TTIImpl->getIntImmCodeSizeCost(Opcode, Idx, Imm, Ty); in getIntImmCodeSizeCost() local
[all …]
H A DInlineOrder.cpp25 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 …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DInlineCost.h69 CostBenefitPair(APInt Cost, APInt Benefit) in CostBenefitPair() argument
70 : Cost(std::move(Cost)), Benefit(std::move(Benefit)) {} in CostBenefitPair()
72 const APInt &getCost() const { return Cost; } in getCost()
77 APInt Cost;
95 int Cost = 0; variable
110 InlineCost(int Cost, int Threshold, int StaticBonusApplied,
113 : Cost(Cost), Threshold(Threshold), in Cost() argument
121 static InlineCost get(int Cost, int Threshold, int StaticBonus = 0) {
122 assert(Cost > AlwaysInlineCost && "Cost crosses sentinel value");
123 assert(Cost < NeverInlineCost && "Cost crosses sentinel value");
[all …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DRegBankSelect.cpp279 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 DBasicTTIImpl.h94 InstructionCost Cost = 0; in getBroadcastShuffleOverhead() local
97 Cost += thisT()->getVectorInstrCost(Instruction::ExtractElement, VTy, in getBroadcastShuffleOverhead()
101 Cost += thisT()->getVectorInstrCost(Instruction::InsertElement, VTy, in getBroadcastShuffleOverhead()
104 return Cost; in getBroadcastShuffleOverhead()
112 InstructionCost Cost = 0; in getPermuteShuffleOverhead() local
121 Cost += thisT()->getVectorInstrCost(Instruction::InsertElement, VTy, in getPermuteShuffleOverhead()
123 Cost += thisT()->getVectorInstrCost(Instruction::ExtractElement, VTy, in getPermuteShuffleOverhead()
126 return Cost; in getPermuteShuffleOverhead()
143 InstructionCost Cost = 0; in getExtractSubvectorOverhead() local
148 Cost += in getExtractSubvectorOverhead()
[all …]
H A DRegisterBankInfo.h198 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 DDAGISelEmitter.cpp50 unsigned Cost = 0; in getResultPatternCost() local
53 Cost++; in getResultPatternCost()
56 Cost += 10; in getResultPatternCost()
59 Cost += getResultPatternCost(Child, CGP); in getResultPatternCost()
60 return Cost; in getResultPatternCost()
70 unsigned Cost = 0; in getResultPatternSize() local
73 Cost += Op->getValueAsInt("CodeSize"); in getResultPatternSize()
76 Cost += getResultPatternSize(Child, CGP); in getResultPatternSize()
77 return Cost; in getResultPatternSize()
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/
H A DSystemZTargetTransformInfo.cpp499 InstructionCost Cost = 0; in getScalarizationOverhead() local
511 Cost += std::min(InstructionCost(1), CurrVectorCost); in getScalarizationOverhead()
518 Cost += BaseT::getScalarizationOverhead(Ty, DemandedElts, Insert, Extract, in getScalarizationOverhead()
520 return Cost; in getScalarizationOverhead()
692 InstructionCost Cost = in getArithmeticInstrCost() local
698 Cost *= 2; in getArithmeticInstrCost()
699 return Cost; in getArithmeticInstrCost()
712 InstructionCost Cost = in getArithmeticInstrCost() local
717 Cost *= 2; in getArithmeticInstrCost()
718 return Cost; in getArithmeticInstrCost()
[all …]
/freebsd/contrib/llvm-project/llvm/tools/llvm-mca/Views/
H A DBottleneckAnalysis.cpp164 OS << " - COST: " << DE.Cost << '\n'; in dumpDependencyEdge()
240 uint64_t Cost = N.Cost + DepEdge.Dep.Cost; in propagateThroughEdges() local
244 if (Cost > To.Cost) { in propagateThroughEdges()
246 To.Cost = Cost; in propagateThroughEdges()
274 return Lhs.Cost < Rhs.Cost; in getCriticalSequence()
432 It->Dep.Cost += Dep.Cost; in addDependency()
453 unsigned RegID, unsigned Cost) { in addRegisterDep() argument
457 DG.addRegisterDep(From, To + SourceSize, RegID, Cost); in addRegisterDep()
458 DG.addRegisterDep(From + SourceSize, To + (SourceSize * 2), RegID, Cost); in addRegisterDep()
461 DG.addRegisterDep(From + SourceSize, To + SourceSize, RegID, Cost); in addRegisterDep()
[all …]
H A DBottleneckAnalysis.h190 uint64_t Cost; member
227 uint64_t Cost; member
258 unsigned Cost) { in addRegisterDep() argument
259 addDependency(From, To, {DependencyEdge::DT_REGISTER, RegID, Cost}); in addRegisterDep()
262 void addMemoryDep(unsigned From, unsigned To, unsigned Cost) { in addMemoryDep() argument
263 addDependency(From, To, {DependencyEdge::DT_MEMORY, /* unused */ 0, Cost}); in addMemoryDep()
267 unsigned Cost) { in addResourceDep() argument
268 addDependency(From, To, {DependencyEdge::DT_RESOURCE, Mask, Cost}); in addResourceDep()
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/
H A DWebAssemblyTargetTransformInfo.cpp58 InstructionCost Cost = in getArithmeticInstrCost() local
71 Cost = in getArithmeticInstrCost()
79 return Cost; in getArithmeticInstrCost()
138 return Entry->Cost; in getCastInstrCost()
188 InstructionCost Cost = BasicTTIImplBase::getVectorInstrCost( in getVectorInstrCost() local
193 return Cost + 25 * TargetTransformInfo::TCC_Expensive; in getVectorInstrCost()
195 return Cost; in getVectorInstrCost()
210 InstructionCost Cost(TTI::TCC_Basic); in getPartialReductionCost() local
239 return OpAExtend == TTI::PR_SignExtend ? Cost : Cost * 2; in getPartialReductionCost()
243 return OpAExtend == TTI::PR_SignExtend ? Cost * 2 : Cost * 4; in getPartialReductionCost()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/
H A DRegBankSelect.h447 bool addLocalCost(uint64_t Cost);
452 bool addNonLocalCost(uint64_t Cost);
462 bool operator<(const MappingCost &Cost) const;
464 bool operator==(const MappingCost &Cost) const;
466 bool operator!=(const MappingCost &Cost) const { return !(*this == Cost); }
468 bool operator>(const MappingCost &Cost) const {
469 return *this != Cost && Cost < *this;
479 friend raw_ostream &operator<<(raw_ostream &OS, const MappingCost &Cost) {
480 Cost.print(OS);
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCTargetTransformInfo.cpp601 InstructionCost Cost = BaseT::getArithmeticInstrCost( in getArithmeticInstrCost() local
603 return Cost * CostFactor; in getArithmeticInstrCost()
650 InstructionCost Cost = in getCastInstrCost() local
652 Cost *= CostFactor; in getCastInstrCost()
655 return Cost == 0 ? 0 : 1; in getCastInstrCost()
656 return Cost; in getCastInstrCost()
668 InstructionCost Cost = BaseT::getCmpSelInstrCost( 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 DFunctionSpecialization.h103 using Cost = InstructionCost; variable
183 LLVM_ABI Cost getCodeSizeSavingsForArg(Argument *A, Constant *C);
185 LLVM_ABI Cost getCodeSizeSavingsFromPendingPHIs();
187 LLVM_ABI Cost getLatencySavingsForKnownConstants();
196 Cost getCodeSizeSavingsForUser(Instruction *User, Value *Use = nullptr,
199 Cost estimateBasicBlocks(SmallVectorImpl<BasicBlock *> &WorkList);
200 Cost estimateSwitchInst(SwitchInst &I);
201 Cost estimateBranchInst(BranchInst &I);
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DRegisterClassInfo.cpp157 uint8_t Cost = RegCosts[PhysReg]; in compute() local
158 MinCost = std::min(MinCost, Cost); in compute()
165 if (Cost != LastCost) in compute()
168 LastCost = Cost; in compute()
176 uint8_t Cost = RegCosts[PhysReg]; in compute() local
177 if (Cost != LastCost) in compute()
180 LastCost = Cost; in compute()
H A DRegAllocEvictionAdvisor.cpp259 EvictionCost Cost; in canEvictInterferenceBasedOnCost() local
303 Cost.BrokenHints += 10; in canEvictInterferenceBasedOnCost()
308 Cost.BrokenHints += BreaksHint; in canEvictInterferenceBasedOnCost()
309 Cost.MaxWeight = std::max(Cost.MaxWeight, Intf->weight()); in canEvictInterferenceBasedOnCost()
311 if (!(Cost < MaxCost)) in canEvictInterferenceBasedOnCost()
327 MaxCost = Cost; in canEvictInterferenceBasedOnCost()
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/
H A DRISCVTargetTransformInfo.cpp58 InstructionCost Cost = 0; in getRISCVInstructionCost() local
62 Cost += TLI->getVRGatherVICost(VT); in getRISCVInstructionCost()
65 Cost += TLI->getVRGatherVVCost(VT); in getRISCVInstructionCost()
69 Cost += TLI->getVSlideVICost(VT); in getRISCVInstructionCost()
73 Cost += TLI->getVSlideVXCost(VT); in getRISCVInstructionCost()
89 Cost += Log2_32_Ceil(VL); in getRISCVInstructionCost()
96 Cost += VL; in getRISCVInstructionCost()
110 Cost += 1; in getRISCVInstructionCost()
113 Cost += LMULCost; in getRISCVInstructionCost()
116 return Cost; in getRISCVInstructionCost()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86TargetTransformInfo.cpp81 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 []()
329 InstructionCost Cost = in getArithmeticInstrCost() local
333 Cost += getArithmeticInstrCost(Instruction::Sub, Ty, CostKind); in getArithmeticInstrCost()
334 return Cost; in getArithmeticInstrCost()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/
H A DNVPTXTargetTransformInfo.h122 InstructionCost Cost = 0; variable
128 Cost += TTI::TCC_Free;
135 Cost += 1;
139 InstructionCost Cost = 3; // 3 x PRMT variable
142 Cost += 1; // zext operand to i32
145 return Cost + BaseT::getScalarizationOverhead(InTy, DemandedElts, Insert,
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DConstantHoisting.cpp366 InstructionCost Cost; in collectConstantCandidates() local
370 Cost = TTI->getIntImmCostIntrin(IntrInst->getIntrinsicID(), Idx, in collectConstantCandidates()
374 Cost = TTI->getIntImmCostInst( in collectConstantCandidates()
379 if (Cost > TargetTransformInfo::TCC_Basic) { in collectConstantCandidates()
388 ConstIntCandVec[Itr->second].addUser(Inst, Idx, Cost.getValue()); in collectConstantCandidates()
391 << " with cost " << Cost << '\n'; in collectConstantCandidates()
394 << *Inst->getOperand(Idx) << " with cost " << Cost in collectConstantCandidates()
434 InstructionCost Cost = in collectConstantCandidates() local
448 ExprCandVec[Itr->second].addUser(Inst, Idx, Cost.getValue()); in collectConstantCandidates()
574 InstructionCost Cost = 0; in maximizeConstantsInRange() local
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUSplitModule.cpp204 auto Cost = in calculateFunctionCosts() local
206 assert(Cost != InstructionCost::getMax()); in calculateFunctionCosts()
208 CostType CostVal = Cost.isValid() in calculateFunctionCosts()
209 ? Cost.getValue() in calculateFunctionCosts()
715 CostType Cost = 0; in calculateCost() local
717 Cost += getNode(NodeID).getIndividualCost(); in calculateCost()
718 return Cost; in calculateCost()
728 CostType Cost = 0; in getNode() local
732 Cost = CostMap.at(Fn); in getNode()
734 N = new (NodesPool.Allocate()) Node(Nodes.size(), GV, Cost, NonCopyable); in getNode()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonTargetTransformInfo.cpp202 unsigned Cost = in getMemoryOpCost() local
210 return Cost * NumLoads; in getMemoryOpCost()
214 return (3 - LogA) * Cost * NumLoads; in getMemoryOpCost()
309 InstructionCost Cost = in getCastInstrCost() local
313 return Cost == 0 ? 0 : 1; in getCastInstrCost()
314 return Cost; in getCastInstrCost()
328 unsigned Cost = (Index != 0) ? 2 : 0; in getVectorInstrCost() local
330 return Cost; in getVectorInstrCost()
332 return Cost + getVectorInstrCost(Instruction::ExtractElement, Val, CostKind, in getVectorInstrCost()
/freebsd/contrib/llvm-project/llvm/lib/CGData/
H A DStableFunctionMap.cpp173 double Cost = 0.0; in isProfitable() local
189 Cost += ParamCount * GlobalMergingParamOverhead + GlobalMergingCallOverhead; in isProfitable()
191 Cost += GlobalMergingExtraThreshold; in isProfitable()
195 bool Result = Benefit > Cost; in isProfitable()
199 << ", Benefit = " << Benefit << ", Cost = " << Cost in isProfitable()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DFunctionSpecialization.cpp108 Cost InstCostVisitor::estimateBasicBlocks( in estimateBasicBlocks()
110 Cost CodeSize = 0; in estimateBasicBlocks()
127 Cost C = TTI.getInstructionCost(&I, TargetTransformInfo::TCK_CodeSize); in estimateBasicBlocks()
151 Cost InstCostVisitor::getCodeSizeSavingsFromPendingPHIs() { in getCodeSizeSavingsFromPendingPHIs()
152 Cost CodeSize; in getCodeSizeSavingsFromPendingPHIs()
163 Cost InstCostVisitor::getCodeSizeSavingsForArg(Argument *A, Constant *C) { in getCodeSizeSavingsForArg()
166 Cost CodeSize; in getCodeSizeSavingsForArg()
189 Cost InstCostVisitor::getLatencySavingsForKnownConstants() { in getLatencySavingsForKnownConstants()
191 Cost TotalLatency = 0; in getLatencySavingsForKnownConstants()
201 Cost Latency = in getLatencySavingsForKnownConstants()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/
H A DARMTargetTransformInfo.cpp507 auto AdjustCost = [&CostKind](InstructionCost Cost) -> InstructionCost { in getCastInstrCost() argument
509 return Cost == 0 ? 0 : 1; in getCastInstrCost()
510 return Cost; in getCastInstrCost()
558 return AdjustCost(Entry->Cost); in getCastInstrCost()
581 return Entry->Cost * ST->getMVEVectorCostFactor(CostKind); in getCastInstrCost()
593 return Entry->Cost * ST->getMVEVectorCostFactor(CostKind); in getCastInstrCost()
610 return Entry->Cost * ST->getMVEVectorCostFactor(CostKind); in getCastInstrCost()
621 return Entry->Cost * ST->getMVEVectorCostFactor(CostKind); in getCastInstrCost()
648 return AdjustCost(Entry->Cost); in getCastInstrCost()
666 return AdjustCost(LT.first * Entry->Cost); in getCastInstrCost()
[all …]

12345