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