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()
452 MappingCost Cost(MBFI ? MBFI->getBlockFreq(MI.getParent()) in computeMapping() local
454 bool Saturated = Cost.addLocalCost(InstrMapping.getCost()); in computeMapping()
459 if (BestCost && Cost > *BestCost) { in computeMapping()
461 return Cost; in computeMapping()
554 Saturated = Cost.addLocalCost(RepairCost); in computeMapping()
565 Cost.saturate(); in computeMapping()
567 Saturated = Cost.addNonLocalCost(PtCost); in computeMapping()
572 if (BestCost && Cost > *BestCost) { in computeMapping()
574 return Cost; in computeMapping()
583 LLVM_DEBUG(dbgs() << "Total cost is: " << Cost << "\n"); in computeMapping()
584 return Cost; in computeMapping()
978 bool RegBankSelect::MappingCost::addLocalCost(uint64_t Cost) { in addLocalCost() argument
980 if (LocalCost + Cost < LocalCost) { in addLocalCost()
984 LocalCost += Cost; in addLocalCost()
988 bool RegBankSelect::MappingCost::addNonLocalCost(uint64_t Cost) { in addNonLocalCost() argument
990 if (NonLocalCost + Cost < NonLocalCost) { in addNonLocalCost()
994 NonLocalCost += Cost; in addNonLocalCost()
1012 bool RegBankSelect::MappingCost::operator<(const MappingCost &Cost) const { in operator <()
1014 if (*this == Cost) in operator <()
1018 if ((*this == ImpossibleCost()) || (Cost == ImpossibleCost())) in operator <()
1019 return (*this == ImpossibleCost()) < (Cost == ImpossibleCost()); in operator <()
1022 if (isSaturated() || Cost.isSaturated()) in operator <()
1023 return isSaturated() < Cost.isSaturated(); in operator <()
1032 if (LLVM_LIKELY(LocalFreq == Cost.LocalFreq)) { in operator <()
1036 if (NonLocalCost == Cost.NonLocalCost) in operator <()
1039 return LocalCost < Cost.LocalCost; in operator <()
1045 if (LocalCost < Cost.LocalCost) in operator <()
1046 OtherLocalAdjust = Cost.LocalCost - LocalCost; in operator <()
1048 ThisLocalAdjust = LocalCost - Cost.LocalCost; in operator <()
1051 OtherLocalAdjust = Cost.LocalCost; in operator <()
1057 if (NonLocalCost < Cost.NonLocalCost) in operator <()
1058 OtherNonLocalAdjust = Cost.NonLocalCost - NonLocalCost; in operator <()
1060 ThisNonLocalAdjust = NonLocalCost - Cost.NonLocalCost; in operator <()
1066 uint64_t OtherScaledCost = OtherLocalAdjust * Cost.LocalFreq; in operator <()
1070 (OtherScaledCost < OtherLocalAdjust || OtherScaledCost < Cost.LocalFreq); in operator <()
1089 bool RegBankSelect::MappingCost::operator==(const MappingCost &Cost) const { in operator ==()
1090 return LocalCost == Cost.LocalCost && NonLocalCost == Cost.NonLocalCost && in operator ==()
1091 LocalFreq == Cost.LocalFreq; in operator ==()