[PATCH] D52634: [WebAssembly] Add DBG_VALUE with local operands location in WebAssemblyExplicitLocals pass

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 08:40:22 PST 2018


aprantl added a comment.

In D52634#1334438 <https://reviews.llvm.org/D52634#1334438>, @yurydelendik wrote:

> In D52634#1293526 <https://reviews.llvm.org/D52634#1293526>, @aprantl wrote:
>
> > Can you explain how this new operation is meant to work?
>
>
> @aprantl, here is some description of what we are trying to achieve: https://github.com/WebAssembly/debugging/issues/1#issuecomment-448237641
>
> In the nutshell, the WebAssembly extensions for the DWARF expression will allow us to express WebAssembly specific locations such as for locals <http://webassembly.github.io/spec/core/syntax/modules.html#syntax-func>, globals <http://webassembly.github.io/spec/core/syntax/modules.html#globals> and operands stack <http://webassembly.github.io/spec/core/syntax/instructions.html#syntax-expr>. The consumers of this information will be limited to LLVM tools, web browser debuggers and AOT/JIT WebAssembly compilers.


Does WebAssembly have a concept of registers? You could just define three additional register numbers for WebAssembly and address a stack slot as `DW_OP_breg [wasm_stack_register] + 3` etc.. This would need less support in all the involved tools. The link says that it was considered, but rejected, but there is no mention as to why.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52634/new/

https://reviews.llvm.org/D52634





More information about the llvm-commits mailing list