Lines Matching refs:CurrentGroup

2244     Module &M, OutlinableGroup &CurrentGroup,  in fillOverallFunction()  argument
2248 OutlinableRegion *CurrentOS = CurrentGroup.Regions[0]; in fillOverallFunction()
2253 << *CurrentGroup.OutlinedFunction << "\n"); in fillOverallFunction()
2255 *CurrentGroup.OutlinedFunction, CurrentGroup.EndBBs); in fillOverallFunction()
2259 CurrentGroup.OutlinedFunction->addFnAttr(A); in fillOverallFunction()
2263 createAndInsertBasicBlocks(CurrentGroup.EndBBs, NewBBs, in fillOverallFunction()
2264 CurrentGroup.OutlinedFunction, "output_block_0"); in fillOverallFunction()
2277 CurrentGroup.EndBBs.find(VToBB.first); in fillOverallFunction()
2293 Module &M, OutlinableGroup &CurrentGroup, in deduplicateExtractedSections() argument
2295 createFunction(M, CurrentGroup, OutlinedFunctionNum); in deduplicateExtractedSections()
2301 fillOverallFunction(M, CurrentGroup, OutputStoreBBs, FuncsToRemove, in deduplicateExtractedSections()
2305 for (unsigned Idx = 1; Idx < CurrentGroup.Regions.size(); Idx++) { in deduplicateExtractedSections()
2306 CurrentOS = CurrentGroup.Regions[Idx]; in deduplicateExtractedSections()
2307 AttributeFuncs::mergeAttributesForOutlining(*CurrentGroup.OutlinedFunction, in deduplicateExtractedSections()
2314 CurrentGroup.EndBBs, NewBBs, CurrentGroup.OutlinedFunction, in deduplicateExtractedSections()
2317 alignOutputBlockWithAggFunc(CurrentGroup, *CurrentOS, NewBBs, in deduplicateExtractedSections()
2318 CurrentGroup.EndBBs, OutputMappings, in deduplicateExtractedSections()
2326 createSwitchStatement(M, CurrentGroup, CurrentGroup.EndBBs, OutputStoreBBs); in deduplicateExtractedSections()
2400 OutlinableGroup &CurrentGroup) { in pruneIncompatibleRegions() argument
2474 OutlinableRegion(IRSC, CurrentGroup); in pruneIncompatibleRegions()
2475 CurrentGroup.Regions.push_back(OS); in pruneIncompatibleRegions()
2482 IROutliner::findBenefitFromAllRegions(OutlinableGroup &CurrentGroup) { in findBenefitFromAllRegions() argument
2484 for (OutlinableRegion *Region : CurrentGroup.Regions) { in findBenefitFromAllRegions()
2506 OutlinableGroup &CurrentGroup = *Region.Parent; in findOutputValueInRegion() local
2510 if (OutputCanon > CurrentGroup.PHINodeGVNTracker) { in findOutputValueInRegion()
2511 auto It = CurrentGroup.PHINodeGVNToGVNs.find(OutputCanon); in findOutputValueInRegion()
2512 assert(It != CurrentGroup.PHINodeGVNToGVNs.end() && in findOutputValueInRegion()
2526 IROutliner::findCostOutputReloads(OutlinableGroup &CurrentGroup) { in findCostOutputReloads() argument
2528 for (OutlinableRegion *Region : CurrentGroup.Regions) { in findCostOutputReloads()
2557 OutlinableGroup &CurrentGroup, in findCostForOutputBlocks() argument
2562 OutlinableRegion &FirstRegion = *CurrentGroup.Regions[0]; in findCostForOutputBlocks()
2563 IRSimilarityCandidate &Candidate = *CurrentGroup.Regions[0]->Candidate; in findCostForOutputBlocks()
2581 CurrentGroup.BranchesToOutside = NumOutputBranches; in findCostForOutputBlocks()
2584 CurrentGroup.OutputGVNCombinations) { in findCostForOutputBlocks()
2609 if (CurrentGroup.OutputGVNCombinations.size() > 1) { in findCostForOutputBlocks()
2617 unsigned DifferentBlocks = CurrentGroup.OutputGVNCombinations.size(); in findCostForOutputBlocks()
2629 void IROutliner::findCostBenefit(Module &M, OutlinableGroup &CurrentGroup) { in findCostBenefit() argument
2630 InstructionCost RegionBenefit = findBenefitFromAllRegions(CurrentGroup); in findCostBenefit()
2631 CurrentGroup.Benefit += RegionBenefit; in findCostBenefit()
2632 LLVM_DEBUG(dbgs() << "Current Benefit: " << CurrentGroup.Benefit << "\n"); in findCostBenefit()
2634 InstructionCost OutputReloadCost = findCostOutputReloads(CurrentGroup); in findCostBenefit()
2635 CurrentGroup.Cost += OutputReloadCost; in findCostBenefit()
2636 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2639 RegionBenefit / CurrentGroup.Regions.size(); in findCostBenefit()
2640 unsigned OverallArgumentNum = CurrentGroup.ArgumentTypes.size(); in findCostBenefit()
2641 unsigned NumRegions = CurrentGroup.Regions.size(); in findCostBenefit()
2643 getTTI(*CurrentGroup.Regions[0]->Candidate->getFunction()); in findCostBenefit()
2649 CurrentGroup.Cost += AverageRegionBenefit; in findCostBenefit()
2650 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2657 CurrentGroup.Cost += in findCostBenefit()
2659 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2668 CurrentGroup.Cost += in findCostBenefit()
2670 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2672 CurrentGroup.Cost += findCostForOutputBlocks(M, CurrentGroup, TTI); in findCostBenefit()
2673 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2813 OutlinableGroup &CurrentGroup = PotentialGroups[PotentialGroupIdx++]; in doOutline() local
2816 pruneIncompatibleRegions(CandidateVec, CurrentGroup); in doOutline()
2821 if (CurrentGroup.Regions.size() < 2) in doOutline()
2827 CurrentGroup.findSameConstants(NotSame); in doOutline()
2829 if (CurrentGroup.IgnoreGroup) in doOutline()
2836 for (OutlinableRegion *OS : CurrentGroup.Regions) { in doOutline()
2862 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2864 if (CurrentGroup.Regions.empty()) in doOutline()
2867 CurrentGroup.collectGVNStoreSets(M); in doOutline()
2870 findCostBenefit(M, CurrentGroup); in doOutline()
2874 if (CurrentGroup.Cost >= CurrentGroup.Benefit && CostModel) { in doOutline()
2876 getORE(*CurrentGroup.Regions[0]->Candidate->getFunction()); in doOutline()
2878 IRSimilarityCandidate *C = CurrentGroup.Regions[0]->Candidate; in doOutline()
2882 << ore::NV(std::to_string(CurrentGroup.Regions.size())) in doOutline()
2885 CurrentGroup.Cost - CurrentGroup.Benefit) in doOutline()
2888 CurrentGroup.Regions.begin(), CurrentGroup.Regions.end(), in doOutline()
2900 NegativeCostGroups.push_back(&CurrentGroup); in doOutline()
2913 OutlinableGroup &CurrentGroup = *CG; in doOutline() local
2916 for (OutlinableRegion *Region : CurrentGroup.Regions) { in doOutline()
2929 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2931 CurrentGroup.Benefit = 0; in doOutline()
2932 CurrentGroup.Cost = 0; in doOutline()
2933 findCostBenefit(M, CurrentGroup); in doOutline()
2934 if (CurrentGroup.Cost >= CurrentGroup.Benefit) in doOutline()
2938 for (OutlinableRegion *Region : CurrentGroup.Regions) { in doOutline()
2945 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2946 if (CurrentGroup.Regions.size() < 2) { in doOutline()
2947 for (OutlinableRegion *R : CurrentGroup.Regions) in doOutline()
2952 LLVM_DEBUG(dbgs() << "Outlining regions with cost " << CurrentGroup.Cost in doOutline()
2953 << " and benefit " << CurrentGroup.Benefit << "\n"); in doOutline()
2957 for (OutlinableRegion *OS : CurrentGroup.Regions) { in doOutline()
2976 << " with benefit " << CurrentGroup.Benefit in doOutline()
2977 << " and cost " << CurrentGroup.Cost << "\n"); in doOutline()
2979 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2981 if (CurrentGroup.Regions.empty()) in doOutline()
2985 getORE(*CurrentGroup.Regions[0]->Call->getFunction()); in doOutline()
2987 IRSimilarityCandidate *C = CurrentGroup.Regions[0]->Candidate; in doOutline()
2989 R << "outlined " << ore::NV(std::to_string(CurrentGroup.Regions.size())) in doOutline()
2991 << ore::NV("Benefit", CurrentGroup.Benefit - CurrentGroup.Cost) in doOutline()
2994 CurrentGroup.Regions.begin(), CurrentGroup.Regions.end(), in doOutline()
3003 deduplicateExtractedSections(M, CurrentGroup, FuncsToRemove, in doOutline()