Lines Matching full:regions
360 /// Array of branch regions corresponding each conditions in the boolean
846 assert(!Record.MappingRegions.empty() && "Function has no regions");
1142 /// Emit segments for active regions which end before \p Loc.
1145 /// regions are completed.
1149 // Sort the completed regions by end location. This makes it simple to
1157 // Emit segments for all completed regions.
1191 // Emit a skipped segment if there are no more active regions. This
1196 // Pop the completed regions.
1200 void buildSegmentsImpl(ArrayRef<CountedRegion> Regions) {
1201 for (const auto &CR : enumerate(Regions)) {
1204 // Active regions which end before the current region need to be popped.
1220 // Avoid making zero-length regions active. If it's the last region,
1223 (CR.index() + 1) == Regions.size() ||
1228 // regions's count at CurStartLoc.
1233 if (CR.index() + 1 == Regions.size() ||
1234 CurStartLoc != Regions[CR.index() + 1].startLoc()) {
1244 // Complete any remaining active regions.
1249 /// Sort a nested sequence of regions from a single file.
1250 static void sortNestedRegions(MutableArrayRef<CountedRegion> Regions) {
1251 llvm::sort(Regions, [](const CountedRegion &LHS, const CountedRegion &RHS) {
1260 // regions of the same kind as the first region of the area, prefer
1271 /// Combine counts of regions which cover the same area.
1273 combineRegions(MutableArrayRef<CountedRegion> Regions) {
1274 if (Regions.empty())
1275 return Regions;
1276 auto Active = Regions.begin();
1277 auto End = Regions.end();
1278 for (auto I = Regions.begin() + 1; I != End; ++I) {
1297 // We add counts of the regions of the same kind as the active region
1301 "Regions are generated in different coverage modes");
1308 return Regions.drop_back(std::distance(++Active, End));
1312 /// Build a sorted list of CoverageSegments from a list of Regions.
1314 buildSegments(MutableArrayRef<CountedRegion> Regions) {
1318 sortNestedRegions(Regions);
1319 ArrayRef<CountedRegion> CombinedRegions = combineRegions(Regions);
1322 dbgs() << "Combined regions:\n";
1400 std::vector<CountedRegion> Regions;
1412 Regions.push_back(CR);
1416 // Capture branch regions specific to the function (excluding expansions).
1427 FileCoverage.Segments = SegmentBuilder::buildSegments(Regions);
1464 std::vector<CountedRegion> Regions;
1467 Regions.push_back(CR);
1471 // Capture branch regions specific to the function (excluding expansions).
1483 FunctionCoverage.Segments = SegmentBuilder::buildSegments(Regions);
1492 std::vector<CountedRegion> Regions;
1495 Regions.push_back(CR);
1500 // Capture branch regions that only pertain to the corresponding expansion.
1506 ExpansionCoverage.Segments = SegmentBuilder::buildSegments(Regions);
1516 // Find the minimum number of regions which start in this line.