Lines Matching refs:CurrentGroup
2239 Module &M, OutlinableGroup &CurrentGroup, in fillOverallFunction() argument
2243 OutlinableRegion *CurrentOS = CurrentGroup.Regions[0]; in fillOverallFunction()
2248 << *CurrentGroup.OutlinedFunction << "\n"); in fillOverallFunction()
2250 *CurrentGroup.OutlinedFunction, CurrentGroup.EndBBs); in fillOverallFunction()
2254 CurrentGroup.OutlinedFunction->addFnAttr(A); in fillOverallFunction()
2258 createAndInsertBasicBlocks(CurrentGroup.EndBBs, NewBBs, in fillOverallFunction()
2259 CurrentGroup.OutlinedFunction, "output_block_0"); in fillOverallFunction()
2272 CurrentGroup.EndBBs.find(VToBB.first); in fillOverallFunction()
2288 Module &M, OutlinableGroup &CurrentGroup, in deduplicateExtractedSections() argument
2290 createFunction(M, CurrentGroup, OutlinedFunctionNum); in deduplicateExtractedSections()
2296 fillOverallFunction(M, CurrentGroup, OutputStoreBBs, FuncsToRemove, in deduplicateExtractedSections()
2300 for (unsigned Idx = 1; Idx < CurrentGroup.Regions.size(); Idx++) { in deduplicateExtractedSections()
2301 CurrentOS = CurrentGroup.Regions[Idx]; in deduplicateExtractedSections()
2302 AttributeFuncs::mergeAttributesForOutlining(*CurrentGroup.OutlinedFunction, in deduplicateExtractedSections()
2309 CurrentGroup.EndBBs, NewBBs, CurrentGroup.OutlinedFunction, in deduplicateExtractedSections()
2312 alignOutputBlockWithAggFunc(CurrentGroup, *CurrentOS, NewBBs, in deduplicateExtractedSections()
2313 CurrentGroup.EndBBs, OutputMappings, in deduplicateExtractedSections()
2321 createSwitchStatement(M, CurrentGroup, CurrentGroup.EndBBs, OutputStoreBBs); in deduplicateExtractedSections()
2395 OutlinableGroup &CurrentGroup) { in pruneIncompatibleRegions() argument
2460 OutlinableRegion(IRSC, CurrentGroup); in pruneIncompatibleRegions()
2461 CurrentGroup.Regions.push_back(OS); in pruneIncompatibleRegions()
2468 IROutliner::findBenefitFromAllRegions(OutlinableGroup &CurrentGroup) { in findBenefitFromAllRegions() argument
2470 for (OutlinableRegion *Region : CurrentGroup.Regions) { in findBenefitFromAllRegions()
2492 OutlinableGroup &CurrentGroup = *Region.Parent; in findOutputValueInRegion() local
2496 if (OutputCanon > CurrentGroup.PHINodeGVNTracker) { in findOutputValueInRegion()
2497 auto It = CurrentGroup.PHINodeGVNToGVNs.find(OutputCanon); in findOutputValueInRegion()
2498 assert(It != CurrentGroup.PHINodeGVNToGVNs.end() && in findOutputValueInRegion()
2511 IROutliner::findCostOutputReloads(OutlinableGroup &CurrentGroup) { in findCostOutputReloads() argument
2513 for (OutlinableRegion *Region : CurrentGroup.Regions) { in findCostOutputReloads()
2542 OutlinableGroup &CurrentGroup, in findCostForOutputBlocks() argument
2547 OutlinableRegion &FirstRegion = *CurrentGroup.Regions[0]; in findCostForOutputBlocks()
2548 IRSimilarityCandidate &Candidate = *CurrentGroup.Regions[0]->Candidate; in findCostForOutputBlocks()
2566 CurrentGroup.BranchesToOutside = NumOutputBranches; in findCostForOutputBlocks()
2569 CurrentGroup.OutputGVNCombinations) { in findCostForOutputBlocks()
2594 if (CurrentGroup.OutputGVNCombinations.size() > 1) { in findCostForOutputBlocks()
2602 unsigned DifferentBlocks = CurrentGroup.OutputGVNCombinations.size(); in findCostForOutputBlocks()
2614 void IROutliner::findCostBenefit(Module &M, OutlinableGroup &CurrentGroup) { in findCostBenefit() argument
2615 InstructionCost RegionBenefit = findBenefitFromAllRegions(CurrentGroup); in findCostBenefit()
2616 CurrentGroup.Benefit += RegionBenefit; in findCostBenefit()
2617 LLVM_DEBUG(dbgs() << "Current Benefit: " << CurrentGroup.Benefit << "\n"); in findCostBenefit()
2619 InstructionCost OutputReloadCost = findCostOutputReloads(CurrentGroup); in findCostBenefit()
2620 CurrentGroup.Cost += OutputReloadCost; in findCostBenefit()
2621 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2624 RegionBenefit / CurrentGroup.Regions.size(); in findCostBenefit()
2625 unsigned OverallArgumentNum = CurrentGroup.ArgumentTypes.size(); in findCostBenefit()
2626 unsigned NumRegions = CurrentGroup.Regions.size(); in findCostBenefit()
2628 getTTI(*CurrentGroup.Regions[0]->Candidate->getFunction()); in findCostBenefit()
2634 CurrentGroup.Cost += AverageRegionBenefit; in findCostBenefit()
2635 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2642 CurrentGroup.Cost += in findCostBenefit()
2644 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2653 CurrentGroup.Cost += in findCostBenefit()
2655 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2657 CurrentGroup.Cost += findCostForOutputBlocks(M, CurrentGroup, TTI); in findCostBenefit()
2658 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2798 OutlinableGroup &CurrentGroup = PotentialGroups[PotentialGroupIdx++]; in doOutline() local
2801 pruneIncompatibleRegions(CandidateVec, CurrentGroup); in doOutline()
2806 if (CurrentGroup.Regions.size() < 2) in doOutline()
2812 CurrentGroup.findSameConstants(NotSame); in doOutline()
2814 if (CurrentGroup.IgnoreGroup) in doOutline()
2821 for (OutlinableRegion *OS : CurrentGroup.Regions) { in doOutline()
2847 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2849 if (CurrentGroup.Regions.empty()) in doOutline()
2852 CurrentGroup.collectGVNStoreSets(M); in doOutline()
2855 findCostBenefit(M, CurrentGroup); in doOutline()
2859 if (CurrentGroup.Cost >= CurrentGroup.Benefit && CostModel) { in doOutline()
2861 getORE(*CurrentGroup.Regions[0]->Candidate->getFunction()); in doOutline()
2863 IRSimilarityCandidate *C = CurrentGroup.Regions[0]->Candidate; in doOutline()
2867 << ore::NV(std::to_string(CurrentGroup.Regions.size())) in doOutline()
2870 CurrentGroup.Cost - CurrentGroup.Benefit) in doOutline()
2873 CurrentGroup.Regions.begin(), CurrentGroup.Regions.end(), in doOutline()
2885 NegativeCostGroups.push_back(&CurrentGroup); in doOutline()
2898 OutlinableGroup &CurrentGroup = *CG; in doOutline() local
2901 for (OutlinableRegion *Region : CurrentGroup.Regions) { in doOutline()
2914 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2916 CurrentGroup.Benefit = 0; in doOutline()
2917 CurrentGroup.Cost = 0; in doOutline()
2918 findCostBenefit(M, CurrentGroup); in doOutline()
2919 if (CurrentGroup.Cost >= CurrentGroup.Benefit) in doOutline()
2923 for (OutlinableRegion *Region : CurrentGroup.Regions) { in doOutline()
2930 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2931 if (CurrentGroup.Regions.size() < 2) { in doOutline()
2932 for (OutlinableRegion *R : CurrentGroup.Regions) in doOutline()
2937 LLVM_DEBUG(dbgs() << "Outlining regions with cost " << CurrentGroup.Cost in doOutline()
2938 << " and benefit " << CurrentGroup.Benefit << "\n"); in doOutline()
2942 for (OutlinableRegion *OS : CurrentGroup.Regions) { in doOutline()
2961 << " with benefit " << CurrentGroup.Benefit in doOutline()
2962 << " and cost " << CurrentGroup.Cost << "\n"); in doOutline()
2964 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2966 if (CurrentGroup.Regions.empty()) in doOutline()
2970 getORE(*CurrentGroup.Regions[0]->Call->getFunction()); in doOutline()
2972 IRSimilarityCandidate *C = CurrentGroup.Regions[0]->Candidate; in doOutline()
2974 R << "outlined " << ore::NV(std::to_string(CurrentGroup.Regions.size())) in doOutline()
2976 << ore::NV("Benefit", CurrentGroup.Benefit - CurrentGroup.Cost) in doOutline()
2979 CurrentGroup.Regions.begin(), CurrentGroup.Regions.end(), in doOutline()
2988 deduplicateExtractedSections(M, CurrentGroup, FuncsToRemove, in doOutline()