[PATCH] D52634: [WIP] [WebAssembly] Add DBG_VALUE with local operands location in WebAssemblyExplicitLocals pass
Yury Delendik via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 9 13:13:30 PST 2018
yurydelendik added a comment.
> Can you explain how this new operation is meant to work?
This particular patch is trying to "save" debug values during the WebAssemblyExplicitLocals pass. Currently they are lost because virtual registers are not replaced. The patch replaces virtual registers with target-index(), that are correspond to the introduced WebAssembly locals, and then with WebAssembly DWARF extensions operators during serialization. (This patch is a first step and it does not fix all WebAssembly passes yet.)
================
Comment at: include/llvm/BinaryFormat/Dwarf.h:62
+ DWARF_VENDOR_MIPS = 6,
+ DWARF_VENDOR_WASM = 7
};
----------------
aprantl wrote:
> Is this actually WASM-specific or is LLVM the only implementation and you could use LLVM instead?
Stack operands, locals and globals are specific to WebAssembly target. (These can be mapped to known primitives such as registers or specific address space, but will require more effort on producer and consumer sides IMHO)
The plan is to make it non-LLVM specific.
Repository:
rL LLVM
https://reviews.llvm.org/D52634
More information about the llvm-commits
mailing list