Lines Matching defs:Cost
15 /// About Cost Model numbers used below it's necessary to say the following:
81 unsigned Cost = ~0U;
84 Cost = RecipThroughputCost;
87 Cost = LatencyCost;
90 Cost = CodeSizeCost;
93 Cost = SizeAndLatencyCost;
96 if (Cost == ~0U)
98 return Cost;
330 InstructionCost Cost =
334 Cost += getArithmeticInstrCost(Instruction::Sub, Ty, CostKind);
335 return Cost;
344 InstructionCost Cost =
347 Cost += getArithmeticInstrCost(Instruction::LShr, Ty, CostKind,
349 Cost += getArithmeticInstrCost(Instruction::Add, Ty, CostKind,
354 Cost += getArithmeticInstrCost(Instruction::Mul, Ty, CostKind, Op1Info.getNoProps(),
356 Cost += getArithmeticInstrCost(Instruction::Sub, Ty, CostKind, Op1Info.getNoProps(),
360 return Cost;
389 if (auto KindCost = Entry->Cost[CostKind])
414 if (auto KindCost = Entry->Cost[CostKind])
450 if (auto KindCost = Entry->Cost[CostKind])
491 if (auto KindCost = Entry->Cost[CostKind])
534 if (auto KindCost = Entry->Cost[CostKind])
565 if (auto KindCost = Entry->Cost[CostKind])
583 if (auto KindCost = Entry->Cost[CostKind])
606 if (auto KindCost = Entry->Cost[CostKind])
628 if (auto KindCost = Entry->Cost[CostKind])
650 if (auto KindCost = Entry->Cost[CostKind])
661 if (auto KindCost = Entry->Cost[CostKind])
683 if (auto KindCost = Entry->Cost[CostKind])
705 if (auto KindCost = Entry->Cost[CostKind])
729 if (auto KindCost = Entry->Cost[CostKind])
766 if (auto KindCost = Entry->Cost[CostKind])
804 if (auto KindCost = Entry->Cost[CostKind])
830 if (auto KindCost = Entry->Cost[CostKind])
842 if (auto KindCost = Entry->Cost[CostKind])
891 if (auto KindCost = Entry->Cost[CostKind])
985 if (auto KindCost = Entry->Cost[CostKind])
1021 if (auto KindCost = Entry->Cost[CostKind])
1063 if (auto KindCost = Entry->Cost[CostKind])
1085 if (auto KindCost = Entry->Cost[CostKind])
1114 if (auto KindCost = Entry->Cost[CostKind])
1189 if (auto KindCost = Entry->Cost[CostKind])
1290 if (auto KindCost = Entry->Cost[CostKind])
1319 if (auto KindCost = Entry->Cost[CostKind])
1342 if (auto KindCost = Entry->Cost[CostKind])
1351 if (auto KindCost = Entry->Cost[CostKind])
1421 if (auto KindCost = Entry->Cost[CostKind])
1443 if (auto KindCost = Entry->Cost[CostKind])
1454 if (auto KindCost = Entry->Cost[CostKind])
1478 if (auto KindCost = Entry->Cost[CostKind])
1670 return Entry->Cost;
1720 InstructionCost Cost = 0;
1724 &Cost](ArrayRef<int> RegMask, unsigned SrcReg, unsigned DestReg) {
1730 Cost += getShuffleCost(TTI::SK_PermuteSingleSrc, SingleOpTy,
1734 Cost += TTI::TCC_Basic;
1740 Cost += TTI::TCC_Basic;
1745 [this, SingleOpTy, CostKind, &Cost](ArrayRef<int> RegMask,
1748 Cost += getShuffleCost(TTI::SK_PermuteTwoSrc, SingleOpTy, RegMask,
1751 return Cost;
1785 return LT.first * Entry->Cost;
1820 return LT.first * Entry->Cost;
1898 if (auto KindCost = Entry->Cost[CostKind])
1953 return LT.first * Entry->Cost;
1975 return LT.first * Entry->Cost;
2038 return LT.first * Entry->Cost;
2052 return LT.first * Entry->Cost;
2084 return LT.first * Entry->Cost;
2147 return LT.first * Entry->Cost;
2151 return LT.first * Entry->Cost;
2165 return LT.first * Entry->Cost;
2990 if (auto KindCost = Entry->Cost[CostKind])
2996 if (auto KindCost = Entry->Cost[CostKind])
3002 if (auto KindCost = Entry->Cost[CostKind])
3009 if (auto KindCost = Entry->Cost[CostKind])
3015 if (auto KindCost = Entry->Cost[CostKind])
3021 if (auto KindCost = Entry->Cost[CostKind])
3027 if (auto KindCost = Entry->Cost[CostKind])
3034 if (auto KindCost = Entry->Cost[CostKind])
3041 if (auto KindCost = Entry->Cost[CostKind])
3048 if (auto KindCost = Entry->Cost[CostKind])
3065 if (auto KindCost = Entry->Cost[CostKind])
3071 if (auto KindCost = Entry->Cost[CostKind])
3077 if (auto KindCost = Entry->Cost[CostKind])
3084 if (auto KindCost = Entry->Cost[CostKind])
3090 if (auto KindCost = Entry->Cost[CostKind])
3096 if (auto KindCost = Entry->Cost[CostKind])
3102 if (auto KindCost = Entry->Cost[CostKind])
3108 if (auto KindCost = Entry->Cost[CostKind])
3114 if (auto KindCost = Entry->Cost[CostKind])
3120 if (auto KindCost = Entry->Cost[CostKind])
3151 auto AdjustCost = [&CostKind](InstructionCost Cost,
3154 return Cost == 0 ? 0 : N;
3155 return Cost * N;
3402 if (auto KindCost = Entry->Cost[CostKind])
3407 if (auto KindCost = Entry->Cost[CostKind])
3412 if (auto KindCost = Entry->Cost[CostKind])
3417 if (auto KindCost = Entry->Cost[CostKind])
3422 if (auto KindCost = Entry->Cost[CostKind])
3427 if (auto KindCost = Entry->Cost[CostKind])
3432 if (auto KindCost = Entry->Cost[CostKind])
3437 if (auto KindCost = Entry->Cost[CostKind])
3442 if (auto KindCost = Entry->Cost[CostKind])
3447 if (auto KindCost = Entry->Cost[CostKind])
4296 auto adjustTableCost = [&](int ISD, unsigned Cost,
4324 return LegalizationCost * (int)Cost;
4347 if (auto KindCost = Entry->Cost[CostKind])
4352 if (auto KindCost = Entry->Cost[CostKind])
4357 if (auto KindCost = Entry->Cost[CostKind])
4362 if (auto KindCost = Entry->Cost[CostKind])
4367 if (auto KindCost = Entry->Cost[CostKind])
4372 if (auto KindCost = Entry->Cost[CostKind])
4377 if (auto KindCost = Entry->Cost[CostKind])
4382 if (auto KindCost = Entry->Cost[CostKind])
4387 if (auto KindCost = Entry->Cost[CostKind])
4392 if (auto KindCost = Entry->Cost[CostKind])
4397 if (auto KindCost = Entry->Cost[CostKind])
4402 if (auto KindCost = Entry->Cost[CostKind])
4407 if (auto KindCost = Entry->Cost[CostKind])
4412 if (auto KindCost = Entry->Cost[CostKind])
4417 if (auto KindCost = Entry->Cost[CostKind])
4422 if (auto KindCost = Entry->Cost[CostKind])
4427 if (auto KindCost = Entry->Cost[CostKind])
4433 if (auto KindCost = Entry->Cost[CostKind])
4437 if (auto KindCost = Entry->Cost[CostKind])
4444 if (auto KindCost = Entry->Cost[CostKind])
4448 if (auto KindCost = Entry->Cost[CostKind])
4455 if (auto KindCost = Entry->Cost[CostKind])
4459 if (auto KindCost = Entry->Cost[CostKind])
4465 if (auto KindCost = Entry->Cost[CostKind])
4469 if (auto KindCost = Entry->Cost[CostKind])
4593 return Entry->Cost + RegisterFileMoveCost;
4633 InstructionCost Cost = 0;
4652 Cost += BaseT::getScalarizationOverhead(Ty, DemandedElts, Insert,
4690 Cost += getShuffleCost(TTI::SK_ExtractSubvector, Ty, std::nullopt,
4692 Cost += BaseT::getScalarizationOverhead(LaneTy, LaneEltMask, Insert,
4708 Cost += getShuffleCost(TTI::SK_InsertSubvector, Ty, std::nullopt,
4719 Cost += DemandedElts.popcount();
4727 Cost += (std::min<unsigned>(NumElts, Pow2Elts) - 1) * LT.first;
4768 Cost += getShuffleCost(TTI::SK_ExtractSubvector, Ty, std::nullopt,
4770 Cost += BaseT::getScalarizationOverhead(
4774 return Cost;
4779 Cost += BaseT::getScalarizationOverhead(Ty, DemandedElts, /*Insert*/ false,
4783 return Cost;
4923 InstructionCost Cost = 0;
4927 Cost += getMemoryOpCost(Instruction::Load, Src, DL.getABITypeAlign(Src),
4934 return (LT.second.isFloatingPoint() ? Cost : 0) + LT.first * 1;
5013 Cost += getShuffleCost(IsLoad ? TTI::ShuffleKind::SK_InsertSubvector
5031 Cost += getScalarizationOverhead(CoalescedVecTy, DemandedElts, IsLoad,
5041 Cost += 2;
5043 Cost += 2;
5045 Cost += 1;
5055 return Cost;
5095 InstructionCost Cost = 0;
5099 return Cost + LT.first;
5104 Cost += getShuffleCost(TTI::SK_PermuteTwoSrc, SrcVTy, std::nullopt,
5113 Cost += getShuffleCost(TTI::SK_InsertSubvector, NewMaskTy, std::nullopt,
5119 return Cost + LT.first * (IsLoad ? 2 : 8);
5122 return Cost + LT.first;
5154 // Cost modeling of Strided Access Computation is hidden by the indexing
5226 return Entry->Cost;
5230 return Entry->Cost;
5234 return Entry->Cost;
5265 return ArithmeticCost + Entry->Cost;
5269 return ArithmeticCost + Entry->Cost;
5273 return ArithmeticCost + Entry->Cost;
5335 return ArithmeticCost + Entry->Cost;
5338 return ArithmeticCost + Entry->Cost;
5341 return ArithmeticCost + Entry->Cost;
5344 return ArithmeticCost + Entry->Cost;
5499 return Entry->Cost;
5503 return Entry->Cost;
5507 return Entry->Cost;
5511 return Entry->Cost;
5531 return MinMaxCost + Entry->Cost;
5535 return MinMaxCost + Entry->Cost;
5539 return MinMaxCost + Entry->Cost;
5543 return MinMaxCost + Entry->Cost;
5641 InstructionCost Cost = 0;
5645 Cost += getIntImmCost(Val);
5648 return std::max<InstructionCost>(1, Cost);
5741 InstructionCost Cost = X86TTIImpl::getIntImmCost(Imm, Ty, CostKind);
5742 return (Cost <= NumConstants * TTI::TCC_Basic)
5744 : Cost;
6330 return MaskCost + NumOfMemOps * MemOpCost + Entry->Cost;
6366 InstructionCost Cost = NumOfResults * NumOfShufflesPerResult * ShuffleCost +
6370 return Cost;
6390 return MaskCost + NumOfMemOps * MemOpCost + Entry->Cost;
6403 InstructionCost Cost =
6407 return Cost;
6477 // The Cost accounts only for the shuffle sequence;
6687 return MemOpCosts + divideCeil(NumMembers * Entry->Cost, Factor);
6712 return MemOpCosts + Entry->Cost;
6717 return MemOpCosts + Entry->Cost;