wasmtime icon indicating copy to clipboard operation
wasmtime copied to clipboard

wasmtime: Annotate emit-clif output with source line numbers

Open jameysharp opened this issue 2 months ago • 1 comments

When we're compiling a WebAssembly module that contains a DWARF .debug_lines section, this commit adds comments to the output of wasmtime compile --emit-clif indicating which file/line/column each block of CLIF instructions originated from.

This is useful when trying to understand why we're generating the code we do when there's a lot of WebAssembly in a single function. That can happen either because there's a lot of source code in that function, or because the toolchain (e.g. LLVM) inlined a lot of other functions into it before generating WebAssembly.

jameysharp avatar Jun 11 '24 01:06 jameysharp