@@ -209,8 +209,8 @@ impl CoverageGraph {
209209 }
210210
211211 #[ inline( always) ]
212- pub fn is_dominated_by ( & self , node : BasicCoverageBlock , dom : BasicCoverageBlock ) -> bool {
213- self . dominators . as_ref ( ) . unwrap ( ) . is_dominated_by ( node , dom )
212+ pub fn dominates ( & self , dom : BasicCoverageBlock , node : BasicCoverageBlock ) -> bool {
213+ self . dominators . as_ref ( ) . unwrap ( ) . dominates ( dom , node )
214214 }
215215
216216 #[ inline( always) ]
@@ -312,7 +312,7 @@ rustc_index::newtype_index! {
312312/// to the BCB's primary counter or expression).
313313///
314314/// The BCB CFG is critical to simplifying the coverage analysis by ensuring graph path-based
315- /// queries (`is_dominated_by ()`, `predecessors`, `successors`, etc.) have branch (control flow)
315+ /// queries (`dominates ()`, `predecessors`, `successors`, etc.) have branch (control flow)
316316/// significance.
317317#[ derive( Debug , Clone ) ]
318318pub ( super ) struct BasicCoverageBlockData {
@@ -594,7 +594,7 @@ impl TraverseCoverageGraphWithLoops {
594594 // branching block would have given an `Expression` (or vice versa).
595595 let ( some_successor_to_add, some_loop_header) =
596596 if let Some ( ( _, loop_header) ) = context. loop_backedges {
597- if basic_coverage_blocks. is_dominated_by ( successor , loop_header ) {
597+ if basic_coverage_blocks. dominates ( loop_header , successor ) {
598598 ( Some ( successor) , Some ( loop_header) )
599599 } else {
600600 ( None , None )
@@ -666,15 +666,15 @@ pub(super) fn find_loop_backedges(
666666 //
667667 // The overall complexity appears to be comparable to many other MIR transform algorithms, and I
668668 // don't expect that this function is creating a performance hot spot, but if this becomes an
669- // issue, there may be ways to optimize the `is_dominated_by ` algorithm (as indicated by an
669+ // issue, there may be ways to optimize the `dominates ` algorithm (as indicated by an
670670 // existing `FIXME` comment in that code), or possibly ways to optimize it's usage here, perhaps
671671 // by keeping track of results for visited `BasicCoverageBlock`s if they can be used to short
672- // circuit downstream `is_dominated_by ` checks.
672+ // circuit downstream `dominates ` checks.
673673 //
674674 // For now, that kind of optimization seems unnecessarily complicated.
675675 for ( bcb, _) in basic_coverage_blocks. iter_enumerated ( ) {
676676 for & successor in & basic_coverage_blocks. successors [ bcb] {
677- if basic_coverage_blocks. is_dominated_by ( bcb , successor ) {
677+ if basic_coverage_blocks. dominates ( successor , bcb ) {
678678 let loop_header = successor;
679679 let backedge_from_bcb = bcb;
680680 debug ! (
0 commit comments