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

Method elaborate

cranelift/codegen/src/egraph/mod.rs:1056–1068  ·  view source on GitHub ↗

Scoped elaboration: compute a final ordering of op computation for each block and update the given Func body. After this runs, the function body is back into the state where every Inst with an used result is placed in the layout (possibly duplicated, if our code-motion logic decides this is the best option). This works in concert with the domtree. We do a preorder traversal of the domtree, tracki

(&mut self)

Source from the content-addressed store, hash-verified

1054 /// the Id-to-Value map and available to all dominated blocks and
1055 /// for the rest of this block. (This subsumes GVN.)
1056 fn elaborate(&mut self) {
1057 let mut elaborator = Elaborator::new(
1058 self.func,
1059 &self.domtree,
1060 self.loop_analysis,
1061 &self.remat_values,
1062 &mut self.stats,
1063 self.ctrl_plane,
1064 );
1065 elaborator.elaborate();
1066
1067 self.check_post_egraph();
1068 }
1069
1070 #[cfg(debug_assertions)]
1071 fn check_post_egraph(&self) {

Callers 1

runMethod · 0.45

Calls 2

check_post_egraphMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected