Lines Matching refs:Cost
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()
462 return Cost; in computeMapping()
555 Saturated = Cost.addLocalCost(RepairCost); in computeMapping()
566 Cost.saturate(); in computeMapping()
568 Saturated = Cost.addNonLocalCost(PtCost); in computeMapping()
573 if (BestCost && Cost > *BestCost) { in computeMapping()
575 return Cost; in computeMapping()
584 LLVM_DEBUG(dbgs() << "Total cost is: " << Cost << "\n"); in computeMapping()
585 return Cost; in computeMapping()
982 bool RegBankSelect::MappingCost::addLocalCost(uint64_t Cost) { in addLocalCost() argument
984 if (LocalCost + Cost < LocalCost) { in addLocalCost()
988 LocalCost += Cost; in addLocalCost()
992 bool RegBankSelect::MappingCost::addNonLocalCost(uint64_t Cost) { in addNonLocalCost() argument
994 if (NonLocalCost + Cost < NonLocalCost) { in addNonLocalCost()
998 NonLocalCost += Cost; in addNonLocalCost()
1016 bool RegBankSelect::MappingCost::operator<(const MappingCost &Cost) const { in operator <()
1018 if (*this == Cost) in operator <()
1022 if ((*this == ImpossibleCost()) || (Cost == ImpossibleCost())) in operator <()
1023 return (*this == ImpossibleCost()) < (Cost == ImpossibleCost()); in operator <()
1026 if (isSaturated() || Cost.isSaturated()) in operator <()
1027 return isSaturated() < Cost.isSaturated(); in operator <()
1036 if (LLVM_LIKELY(LocalFreq == Cost.LocalFreq)) { in operator <()
1040 if (NonLocalCost == Cost.NonLocalCost) in operator <()
1043 return LocalCost < Cost.LocalCost; in operator <()
1049 if (LocalCost < Cost.LocalCost) in operator <()
1050 OtherLocalAdjust = Cost.LocalCost - LocalCost; in operator <()
1052 ThisLocalAdjust = LocalCost - Cost.LocalCost; in operator <()
1055 OtherLocalAdjust = Cost.LocalCost; in operator <()
1061 if (NonLocalCost < Cost.NonLocalCost) in operator <()
1062 OtherNonLocalAdjust = Cost.NonLocalCost - NonLocalCost; in operator <()
1064 ThisNonLocalAdjust = NonLocalCost - Cost.NonLocalCost; in operator <()
1070 uint64_t OtherScaledCost = OtherLocalAdjust * Cost.LocalFreq; in operator <()
1074 (OtherScaledCost < OtherLocalAdjust || OtherScaledCost < Cost.LocalFreq); in operator <()
1093 bool RegBankSelect::MappingCost::operator==(const MappingCost &Cost) const { in operator ==()
1094 return LocalCost == Cost.LocalCost && NonLocalCost == Cost.NonLocalCost && in operator ==()
1095 LocalFreq == Cost.LocalFreq; in operator ==()