Lines Matching defs:CurrentGroup

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