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

Method compute_postorder

cranelift/codegen/src/dominator_tree/simple.rs:249–253  ·  view source on GitHub ↗

Reset all internal data structures and compute a post-order of the control flow graph. This leaves `rpo_number == 1` for all reachable blocks, 0 for unreachable ones.

(&mut self, func: &Function)

Source from the content-addressed store, hash-verified

247 ///
248 /// This leaves `rpo_number == 1` for all reachable blocks, 0 for unreachable ones.
249 fn compute_postorder(&mut self, func: &Function) {
250 self.clear();
251 self.nodes.resize(func.dfg.num_blocks());
252 self.postorder.extend(self.dfs.post_order_iter(func));
253 }
254
255 /// Build a dominator tree from a control flow graph using Keith D. Cooper's
256 /// "Simple, Fast Dominator Algorithm."

Callers 1

computeMethod · 0.80

Calls 5

post_order_iterMethod · 0.80
clearMethod · 0.45
resizeMethod · 0.45
num_blocksMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected