MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / block_dominates

Method block_dominates

src/function.rs:650–661  ·  view source on GitHub ↗

Returns whether block `a` dominates block `b`. This should return true if `a == b`.

(&self, a: Block, mut b: Block)

Source from the content-addressed store, hash-verified

648 ///
649 /// This should return true if `a == b`.
650 fn block_dominates(&self, a: Block, mut b: Block) -> bool {
651 // Walk b up the dominator tree until a is reached or we go past it.
652 // This works because the block ordering is required to be topologically
653 // ordered with regards to the dominator tree.
654 while a < b {
655 match self.block_immediate_dominator(b) {
656 Some(idom) => b = idom,
657 None => return false,
658 }
659 }
660 a == b
661 }
662
663 /// Get the block parameters for a given block.
664 ///

Callers 1

optimize_editMethod · 0.80

Implementers 2

mod.rssrc/debug_utils/generic_function/mod.r
parallel_moves.rsfuzz/fuzz_targets/parallel_moves.rs

Calls 1

Tested by

no test coverage detected