Preprocess dominator tree to answer queries in O(1)

This commit is contained in:
Tomasz Miąsko 2023-01-21 00:00:00 +00:00 committed by Camille GILLOT
parent 6c64870fa6
commit aa1267f630
7 changed files with 137 additions and 55 deletions

View file

@ -345,7 +345,7 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
// before the dominated equal spans). When later comparing two spans in
// order, the first will either dominate the second, or they will have no
// dominator relationship.
self.basic_coverage_blocks.dominators().rank_partial_cmp(a.bcb, b.bcb)
self.basic_coverage_blocks.rank_partial_cmp(a.bcb, b.bcb)
}
} else {
// Sort hi() in reverse order so shorter spans are attempted after longer spans.