Lines Matching full:regions

1 //===- IROutliner.cpp -- Outline Similar Regions ----------------*- C++ -*-===//
68 /// a set of regions that are structurally similar to one another, such as the
70 /// and a list of the different regions. This information is used in the
71 /// deduplication of extracted regions with the same structure.
74 std::vector<OutlinableRegion *> Regions;
127 /// Regions.
130 /// Regions.
137 /// For the \ref Regions, we look at every Value. If it is a constant,
144 /// For the regions, look at each set of GVN stores needed and account for
213 /// when PHINodes are included in outlined regions.
601 for (OutlinableRegion *Region : Regions)
606 for (OutlinableRegion *OS : Regions)
616 /// Get the subprogram if it exists for one of the outlined regions.
618 /// \param [in] Group - The set of regions to find a subprogram for.
621 for (OutlinableRegion *OS : Group.Regions)
642 for (OutlinableRegion *R : Group.Regions) {
858 /// have the same constant value in the regions structurally similar to
903 // TODO: Support regions with sunken allocas: values whose lifetimes are
1019 // same inputs for all of the different regions contained in the
1168 /// identify different output schemes for the set of regions.
1424 /// function constructed from the deduplicated similar regions, replacing and
1429 /// \param [in] Region - The regions of extracted code to be replaced with a new
1699 OutlinableRegion *FirstRegion = Group.Regions[0];
1800 /// function to define the overall outlined function for all the regions, or
1801 /// if we are operating on one of the following regions.
1884 Region.findCorrespondingValueIn(*Group.Regions[0], ValueOperand);
2064 /// \param [in] OG - The OutlinableGroup of regions to be outlined.
2150 /// \param [in] OG - The group of regions to be outlined.
2159 // regions. The second will occur when we have two outputs that are combined
2234 /// the extracted regions of a certain structure from the first region in the
2235 /// list of regions. Replace this first region's extracted function with the
2239 /// \param [in] CurrentGroup - The group of regions to be outlined.
2251 OutlinableRegion *CurrentOS = CurrentGroup.Regions[0];
2308 for (unsigned Idx = 1; Idx < CurrentGroup.Regions.size(); Idx++) {
2309 CurrentOS = CurrentGroup.Regions[Idx];
2461 // Greedily prune out any regions that will overlap with already chosen
2462 // regions.
2478 CurrentGroup.Regions.push_back(OS);
2487 for (OutlinableRegion *Region : CurrentGroup.Regions) {
2531 for (OutlinableRegion *Region : CurrentGroup.Regions) {
2565 OutlinableRegion &FirstRegion = *CurrentGroup.Regions[0];
2566 IRSimilarityCandidate &Candidate = *CurrentGroup.Regions[0]->Candidate;
2642 RegionBenefit / CurrentGroup.Regions.size();
2644 unsigned NumRegions = CurrentGroup.Regions.size();
2646 getTTI(*CurrentGroup.Regions[0]->Candidate->getFunction());
2749 // The sequences of outlinable regions has now changed. We must fix the
2821 // We pruned the number of regions to 0 to 1, meaning that it's not worth
2824 if (CurrentGroup.Regions.size() < 2)
2839 for (OutlinableRegion *OS : CurrentGroup.Regions) {
2865 CurrentGroup.Regions = std::move(OutlinedRegions);
2867 if (CurrentGroup.Regions.empty())
2879 getORE(*CurrentGroup.Regions[0]->Candidate->getFunction());
2881 IRSimilarityCandidate *C = CurrentGroup.Regions[0]->Candidate;
2885 << ore::NV(std::to_string(CurrentGroup.Regions.size()))
2886 << " regions due to estimated increase of "
2891 CurrentGroup.Regions.begin(), CurrentGroup.Regions.end(),
2919 for (OutlinableRegion *Region : CurrentGroup.Regions) {
2931 // we are still outlining enough regions to make up for the added cost.
2932 CurrentGroup.Regions = std::move(OutlinedRegions);
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
2960 for (OutlinableRegion *OS : CurrentGroup.Regions) {
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()))
2993 << " regions with decrease of "
2997 CurrentGroup.Regions.begin(), CurrentGroup.Regions.end(),