Lines Matching refs:CurrentGroup

2247     Module &M, OutlinableGroup &CurrentGroup,  in fillOverallFunction()  argument
2251 OutlinableRegion *CurrentOS = CurrentGroup.Regions[0]; in fillOverallFunction()
2256 << *CurrentGroup.OutlinedFunction << "\n"); in fillOverallFunction()
2258 *CurrentGroup.OutlinedFunction, CurrentGroup.EndBBs); in fillOverallFunction()
2262 CurrentGroup.OutlinedFunction->addFnAttr(A); in fillOverallFunction()
2266 createAndInsertBasicBlocks(CurrentGroup.EndBBs, NewBBs, in fillOverallFunction()
2267 CurrentGroup.OutlinedFunction, "output_block_0"); in fillOverallFunction()
2280 CurrentGroup.EndBBs.find(VToBB.first); in fillOverallFunction()
2296 Module &M, OutlinableGroup &CurrentGroup, in deduplicateExtractedSections() argument
2298 createFunction(M, CurrentGroup, OutlinedFunctionNum); in deduplicateExtractedSections()
2304 fillOverallFunction(M, CurrentGroup, OutputStoreBBs, FuncsToRemove, in deduplicateExtractedSections()
2308 for (unsigned Idx = 1; Idx < CurrentGroup.Regions.size(); Idx++) { in deduplicateExtractedSections()
2309 CurrentOS = CurrentGroup.Regions[Idx]; in deduplicateExtractedSections()
2310 AttributeFuncs::mergeAttributesForOutlining(*CurrentGroup.OutlinedFunction, in deduplicateExtractedSections()
2317 CurrentGroup.EndBBs, NewBBs, CurrentGroup.OutlinedFunction, in deduplicateExtractedSections()
2320 alignOutputBlockWithAggFunc(CurrentGroup, *CurrentOS, NewBBs, in deduplicateExtractedSections()
2321 CurrentGroup.EndBBs, OutputMappings, in deduplicateExtractedSections()
2329 createSwitchStatement(M, CurrentGroup, CurrentGroup.EndBBs, OutputStoreBBs); in deduplicateExtractedSections()
2403 OutlinableGroup &CurrentGroup) { in pruneIncompatibleRegions() argument
2477 OutlinableRegion(IRSC, CurrentGroup); in pruneIncompatibleRegions()
2478 CurrentGroup.Regions.push_back(OS); in pruneIncompatibleRegions()
2485 IROutliner::findBenefitFromAllRegions(OutlinableGroup &CurrentGroup) { in findBenefitFromAllRegions() argument
2487 for (OutlinableRegion *Region : CurrentGroup.Regions) { in findBenefitFromAllRegions()
2509 OutlinableGroup &CurrentGroup = *Region.Parent; in findOutputValueInRegion() local
2513 if (OutputCanon > CurrentGroup.PHINodeGVNTracker) { in findOutputValueInRegion()
2514 auto It = CurrentGroup.PHINodeGVNToGVNs.find(OutputCanon); in findOutputValueInRegion()
2515 assert(It != CurrentGroup.PHINodeGVNToGVNs.end() && in findOutputValueInRegion()
2529 IROutliner::findCostOutputReloads(OutlinableGroup &CurrentGroup) { in findCostOutputReloads() argument
2531 for (OutlinableRegion *Region : CurrentGroup.Regions) { in findCostOutputReloads()
2560 OutlinableGroup &CurrentGroup, in findCostForOutputBlocks() argument
2565 OutlinableRegion &FirstRegion = *CurrentGroup.Regions[0]; in findCostForOutputBlocks()
2566 IRSimilarityCandidate &Candidate = *CurrentGroup.Regions[0]->Candidate; in findCostForOutputBlocks()
2584 CurrentGroup.BranchesToOutside = NumOutputBranches; in findCostForOutputBlocks()
2587 CurrentGroup.OutputGVNCombinations) { in findCostForOutputBlocks()
2612 if (CurrentGroup.OutputGVNCombinations.size() > 1) { in findCostForOutputBlocks()
2620 unsigned DifferentBlocks = CurrentGroup.OutputGVNCombinations.size(); in findCostForOutputBlocks()
2632 void IROutliner::findCostBenefit(Module &M, OutlinableGroup &CurrentGroup) { in findCostBenefit() argument
2633 InstructionCost RegionBenefit = findBenefitFromAllRegions(CurrentGroup); in findCostBenefit()
2634 CurrentGroup.Benefit += RegionBenefit; in findCostBenefit()
2635 LLVM_DEBUG(dbgs() << "Current Benefit: " << CurrentGroup.Benefit << "\n"); in findCostBenefit()
2637 InstructionCost OutputReloadCost = findCostOutputReloads(CurrentGroup); in findCostBenefit()
2638 CurrentGroup.Cost += OutputReloadCost; in findCostBenefit()
2639 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2642 RegionBenefit / CurrentGroup.Regions.size(); in findCostBenefit()
2643 unsigned OverallArgumentNum = CurrentGroup.ArgumentTypes.size(); in findCostBenefit()
2644 unsigned NumRegions = CurrentGroup.Regions.size(); in findCostBenefit()
2646 getTTI(*CurrentGroup.Regions[0]->Candidate->getFunction()); in findCostBenefit()
2652 CurrentGroup.Cost += AverageRegionBenefit; in findCostBenefit()
2653 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2660 CurrentGroup.Cost += in findCostBenefit()
2662 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2671 CurrentGroup.Cost += in findCostBenefit()
2673 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2675 CurrentGroup.Cost += findCostForOutputBlocks(M, CurrentGroup, TTI); in findCostBenefit()
2676 LLVM_DEBUG(dbgs() << "Current Cost: " << CurrentGroup.Cost << "\n"); in findCostBenefit()
2816 OutlinableGroup &CurrentGroup = PotentialGroups[PotentialGroupIdx++]; in doOutline() local
2819 pruneIncompatibleRegions(CandidateVec, CurrentGroup); in doOutline()
2824 if (CurrentGroup.Regions.size() < 2) in doOutline()
2830 CurrentGroup.findSameConstants(NotSame); in doOutline()
2832 if (CurrentGroup.IgnoreGroup) in doOutline()
2839 for (OutlinableRegion *OS : CurrentGroup.Regions) { in doOutline()
2865 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2867 if (CurrentGroup.Regions.empty()) in doOutline()
2870 CurrentGroup.collectGVNStoreSets(M); in doOutline()
2873 findCostBenefit(M, CurrentGroup); in doOutline()
2877 if (CurrentGroup.Cost >= CurrentGroup.Benefit && CostModel) { in doOutline()
2879 getORE(*CurrentGroup.Regions[0]->Candidate->getFunction()); in doOutline()
2881 IRSimilarityCandidate *C = CurrentGroup.Regions[0]->Candidate; in doOutline()
2885 << ore::NV(std::to_string(CurrentGroup.Regions.size())) in doOutline()
2888 CurrentGroup.Cost - CurrentGroup.Benefit) in doOutline()
2891 CurrentGroup.Regions.begin(), CurrentGroup.Regions.end(), in doOutline()
2903 NegativeCostGroups.push_back(&CurrentGroup); in doOutline()
2916 OutlinableGroup &CurrentGroup = *CG; in doOutline() local
2919 for (OutlinableRegion *Region : CurrentGroup.Regions) { in doOutline()
2932 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2934 CurrentGroup.Benefit = 0; in doOutline()
2935 CurrentGroup.Cost = 0; in doOutline()
2936 findCostBenefit(M, CurrentGroup); in doOutline()
2937 if (CurrentGroup.Cost >= CurrentGroup.Benefit) in doOutline()
2941 for (OutlinableRegion *Region : CurrentGroup.Regions) { in doOutline()
2948 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2949 if (CurrentGroup.Regions.size() < 2) { in doOutline()
2950 for (OutlinableRegion *R : CurrentGroup.Regions) in doOutline()
2955 LLVM_DEBUG(dbgs() << "Outlining regions with cost " << CurrentGroup.Cost in doOutline()
2956 << " and benefit " << CurrentGroup.Benefit << "\n"); in doOutline()
2960 for (OutlinableRegion *OS : CurrentGroup.Regions) { in doOutline()
2979 << " with benefit " << CurrentGroup.Benefit in doOutline()
2980 << " and cost " << CurrentGroup.Cost << "\n"); in doOutline()
2982 CurrentGroup.Regions = std::move(OutlinedRegions); in doOutline()
2984 if (CurrentGroup.Regions.empty()) in doOutline()
2988 getORE(*CurrentGroup.Regions[0]->Call->getFunction()); in doOutline()
2990 IRSimilarityCandidate *C = CurrentGroup.Regions[0]->Candidate; in doOutline()
2992 R << "outlined " << ore::NV(std::to_string(CurrentGroup.Regions.size())) in doOutline()
2994 << ore::NV("Benefit", CurrentGroup.Benefit - CurrentGroup.Cost) in doOutline()
2997 CurrentGroup.Regions.begin(), CurrentGroup.Regions.end(), in doOutline()
3006 deduplicateExtractedSections(M, CurrentGroup, FuncsToRemove, in doOutline()