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

Method compute

cranelift/codegen/src/flowgraph.rs:107–117  ·  view source on GitHub ↗

Compute the control flow graph of `func`. This will clear and overwrite any information already stored in this data structure.

(&mut self, func: &Function)

Source from the content-addressed store, hash-verified

105 ///
106 /// This will clear and overwrite any information already stored in this data structure.
107 pub fn compute(&mut self, func: &Function) {
108 let _tt = timing::flowgraph();
109 self.clear();
110 self.data.resize(func.dfg.num_blocks());
111
112 for block in &func.layout {
113 self.compute_block(func, block);
114 }
115
116 self.valid = true;
117 }
118
119 fn compute_block(&mut self, func: &Function, block: Block) {
120 inst_predicates::visit_block_succs(func, block, |inst, dest, _| {

Callers 5

mutateMethod · 0.45
with_functionMethod · 0.45
compute_cfgMethod · 0.45
compute_domtreeMethod · 0.45
compute_loop_analysisMethod · 0.45

Calls 4

compute_blockMethod · 0.80
clearMethod · 0.45
resizeMethod · 0.45
num_blocksMethod · 0.45

Tested by

no test coverage detected