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

Method iter

cranelift/codegen/src/traversals.rs:54–60  ·  view source on GitHub ↗

Perform a depth-first traversal over the given function. Yields pairs of `(Event, ir::Block)`. This iterator can be used to perform either pre- or post-order traversals, or a combination of the two.

(&'a mut self, func: &'a ir::Function)

Source from the content-addressed store, hash-verified

52 /// This iterator can be used to perform either pre- or post-order
53 /// traversals, or a combination of the two.
54 pub fn iter<'a>(&'a mut self, func: &'a ir::Function) -> DfsIter<'a> {
55 self.clear();
56 if let Some(e) = func.layout.entry_block() {
57 self.stack.push((Event::Enter, e));
58 }
59 DfsIter { dfs: self, func }
60 }
61
62 /// Perform a pre-order traversal over the given function.
63 ///

Callers 2

pre_order_iterMethod · 0.45
post_order_iterMethod · 0.45

Calls 3

clearMethod · 0.45
entry_blockMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected