Lines Matching refs:Cloner
278 getOutliningCallBBRelativeFreq(FunctionCloner &Cloner) const;
282 bool shouldPartialInline(CallBase &CB, FunctionCloner &Cloner,
289 bool tryPartialInline(FunctionCloner &Cloner);
328 computeOutliningCosts(FunctionCloner &Cloner) const;
679 FunctionCloner &Cloner) const { in getOutliningCallBBRelativeFreq()
680 BasicBlock *OutliningCallBB = Cloner.OutlinedFunctions.back().second; in getOutliningCallBBRelativeFreq()
682 Cloner.ClonedFuncBFI->getBlockFreq(&Cloner.ClonedFunc->getEntryBlock()); in getOutliningCallBBRelativeFreq()
684 Cloner.ClonedFuncBFI->getBlockFreq(OutliningCallBB); in getOutliningCallBBRelativeFreq()
694 if (hasProfileData(*Cloner.OrigFunc, *Cloner.ClonedOI)) in getOutliningCallBBRelativeFreq()
719 CallBase &CB, FunctionCloner &Cloner, BlockFrequency WeightedOutliningRcost, in shouldPartialInline() argument
724 assert(Callee == Cloner.ClonedFunc); in shouldPartialInline()
741 << NV("Callee", Cloner.OrigFunc) in shouldPartialInline()
750 << NV("Callee", Cloner.OrigFunc) << " not partially inlined into " in shouldPartialInline()
760 << NV("Callee", Cloner.OrigFunc) << " not partially inlined into " in shouldPartialInline()
778 << NV("Callee", Cloner.OrigFunc) << " not partially inlined into " in shouldPartialInline()
792 << NV("Callee", Cloner.OrigFunc) << " can be partially inlined into " in shouldPartialInline()
865 PartialInlinerImpl::computeOutliningCosts(FunctionCloner &Cloner) const { in computeOutliningCosts()
867 for (auto FuncBBPair : Cloner.OutlinedFunctions) { in computeOutliningCosts()
880 assert(OutlinedFunctionCost >= Cloner.OutlinedRegionCost && in computeOutliningCosts()
887 2 * InlineConstants::getInstrCost() * Cloner.OutlinedFunctions.size(); in computeOutliningCosts()
891 (OutlinedFunctionCost - Cloner.OutlinedRegionCost) + in computeOutliningCosts()
1258 FunctionCloner Cloner(&F, OMRI.get(), ORE, LookupAssumptionCache, GetTTI); in unswitchFunction() local
1266 bool DidOutline = Cloner.doMultiRegionFunctionOutlining(); in unswitchFunction()
1271 Cloner.ClonedFunc->print(dbgs()); in unswitchFunction()
1275 if (tryPartialInline(Cloner)) in unswitchFunction()
1288 FunctionCloner Cloner(&F, OI.get(), ORE, LookupAssumptionCache, GetTTI); in unswitchFunction() local
1289 Cloner.normalizeReturnBlock(); in unswitchFunction()
1291 Function *OutlinedFunction = Cloner.doSingleRegionFunctionOutlining(); in unswitchFunction()
1296 if (tryPartialInline(Cloner)) in unswitchFunction()
1302 bool PartialInlinerImpl::tryPartialInline(FunctionCloner &Cloner) { in tryPartialInline() argument
1303 if (Cloner.OutlinedFunctions.empty()) in tryPartialInline()
1306 auto OutliningCosts = computeOutliningCosts(Cloner); in tryPartialInline()
1317 if (Cloner.ClonedOI) in tryPartialInline()
1318 RelativeToEntryFreq = getOutliningCallBBRelativeFreq(Cloner); in tryPartialInline()
1334 if (!SkipCostAnalysis && Cloner.OutlinedRegionCost < SizeCost) { in tryPartialInline()
1335 OptimizationRemarkEmitter OrigFuncORE(Cloner.OrigFunc); in tryPartialInline()
1338 std::tie(DLoc, Block) = getOneDebugLoc(*Cloner.ClonedFunc); in tryPartialInline()
1342 << ore::NV("Function", Cloner.OrigFunc) in tryPartialInline()
1344 << ore::NV("OutlinedRegionOriginalSize", Cloner.OutlinedRegionCost) in tryPartialInline()
1351 assert(Cloner.OrigFunc->users().empty() && in tryPartialInline()
1354 std::vector<User *> Users(Cloner.ClonedFunc->user_begin(), in tryPartialInline()
1355 Cloner.ClonedFunc->user_end()); in tryPartialInline()
1358 auto CalleeEntryCount = Cloner.OrigFunc->getEntryCount(); in tryPartialInline()
1360 computeCallsiteToProfCountMap(Cloner.ClonedFunc, CallSiteToProfCountMap); in tryPartialInline()
1377 if (!shouldPartialInline(*CB, Cloner, WeightedRcost, CallerORE)) in tryPartialInline()
1383 OR << ore::NV("Callee", Cloner.OrigFunc) << " partially inlined into " in tryPartialInline()
1390 (Cloner.ClonedOI ? Cloner.OutlinedFunctions.back().first in tryPartialInline()
1406 if (Cloner.ClonedOI) in tryPartialInline()
1413 Cloner.IsFunctionInlined = true; in tryPartialInline()
1415 Cloner.OrigFunc->setEntryCount(Function::ProfileCount( in tryPartialInline()
1417 OptimizationRemarkEmitter OrigFuncORE(Cloner.OrigFunc); in tryPartialInline()
1419 return OptimizationRemark(DEBUG_TYPE, "PartiallyInlined", Cloner.OrigFunc) in tryPartialInline()