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

Method is_in_loop

cranelift/codegen/src/loop_analysis.rs:132–138  ·  view source on GitHub ↗

Determine if a Block belongs to a loop by running a finger along the loop tree. Returns `true` if `block` is in loop `lp`.

(&self, block: Block, lp: Loop)

Source from the content-addressed store, hash-verified

130 ///
131 /// Returns `true` if `block` is in loop `lp`.
132 pub fn is_in_loop(&self, block: Block, lp: Loop) -> bool {
133 let block_loop = self.block_loop_map[block];
134 match block_loop.expand() {
135 None => false,
136 Some(block_loop) => self.is_child_loop(block_loop, lp),
137 }
138 }
139
140 /// Determines if a loop is contained in another loop.
141 ///

Callers 2

start_blockMethod · 0.80
process_elab_stackMethod · 0.80

Calls 2

is_child_loopMethod · 0.80
expandMethod · 0.45

Tested by

no test coverage detected