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

Method compile_stencil

cranelift/codegen/src/context.rs:128–144  ·  view source on GitHub ↗

Internally compiles the function into a stencil. Public only for testing and fuzzing purposes.

(
        &mut self,
        isa: &dyn TargetIsa,
        ctrl_plane: &mut ControlPlane,
    )

Source from the content-addressed store, hash-verified

126 ///
127 /// Public only for testing and fuzzing purposes.
128 pub fn compile_stencil(
129 &mut self,
130 isa: &dyn TargetIsa,
131 ctrl_plane: &mut ControlPlane,
132 ) -> CodegenResult<CompiledCodeStencil> {
133 let result;
134 trace!("****** START compiling {}", self.func.display_spec());
135 {
136 let _tt = timing::compile();
137
138 self.verify_if(isa)?;
139 self.optimize(isa, ctrl_plane)?;
140 result = isa.compile_function(&self.func, &self.domtree, self.want_disasm, ctrl_plane);
141 }
142 trace!("****** DONE compiling {}\n", self.func.display_spec());
143 result
144 }
145
146 /// Optimize the function, performing all compilation steps up to
147 /// but not including machine-code lowering and register

Callers 2

compile_with_cacheMethod · 0.80
compileMethod · 0.80

Calls 4

verify_ifMethod · 0.80
optimizeMethod · 0.80
compileFunction · 0.50
compile_functionMethod · 0.45

Tested by

no test coverage detected