MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / block_dominates

Method block_dominates

cranelift/codegen/src/dominator_tree.rs:295–299  ·  view source on GitHub ↗

Returns `true` if `block_a` dominates `block_b`. A block is considered to dominate itself. This uses preorder numbers for O(1) constant time performance.

(&self, block_a: Block, block_b: Block)

Source from the content-addressed store, hash-verified

293 /// A block is considered to dominate itself.
294 /// This uses preorder numbers for O(1) constant time performance.
295 pub fn block_dominates(&self, block_a: Block, block_b: Block) -> bool {
296 let na = &self.nodes[block_a];
297 let nb = &self.nodes[block_b];
298 na.dom_pre_number <= nb.dom_pre_number && na.dom_pre_max >= nb.dom_pre_max
299 }
300
301 /// Get an iterator over the direct children of `block` in the dominator tree.
302 ///

Callers 3

dominatesMethod · 0.45
is_block_loop_headerMethod · 0.45
discover_loop_blocksMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected