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

Method compile_function

cranelift/codegen/src/isa/x64/mod.rs:76–100  ·  view source on GitHub ↗
(
        &self,
        func: &Function,
        domtree: &DominatorTree,
        want_disasm: bool,
        ctrl_plane: &mut ControlPlane,
    )

Source from the content-addressed store, hash-verified

74
75impl TargetIsa for X64Backend {
76 fn compile_function(
77 &self,
78 func: &Function,
79 domtree: &DominatorTree,
80 want_disasm: bool,
81 ctrl_plane: &mut ControlPlane,
82 ) -> CodegenResult<CompiledCodeStencil> {
83 let (vcode, regalloc_result) = self.compile_vcode(func, domtree, ctrl_plane)?;
84
85 let emit_result = vcode.emit(&regalloc_result, want_disasm, &self.flags, ctrl_plane);
86 let value_labels_ranges = emit_result.value_labels_ranges;
87 let buffer = emit_result.buffer;
88
89 if let Some(disasm) = emit_result.disasm.as_ref() {
90 crate::trace!("disassembly:\n{}", disasm);
91 }
92
93 Ok(CompiledCodeStencil {
94 buffer,
95 vcode: emit_result.disasm,
96 value_labels_ranges,
97 bb_starts: emit_result.bb_offsets,
98 bb_edges: emit_result.bb_edges,
99 })
100 }
101
102 fn flags(&self) -> &Flags {
103 &self.flags

Callers 1

compile_stencilMethod · 0.45

Calls 4

OkFunction · 0.85
compile_vcodeMethod · 0.45
emitMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected