[PATCH] D94140: [WebAssembly] Fixed byval args missing DWARF DW_AT_LOCATION

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 17:03:47 PST 2021


aardappel created this revision.
aardappel added reviewers: dschuff, dblaikie, yurydelendik, aheejin.
Herald added subscribers: ecnelises, sunfish, hiraditya, jgravelle-google, sbc100.
aardappel requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

A struct in C passed by value did not get debug information. Such values are currently
lowered to a Wasm local even in -O0 (not to an alloca like on other archs), which becomes
a Target Index operand (TI_LOCAL). The DWARF writing code was not emitting locations
in for TI's specifically if the location is a single range (not a list).

In addition, the ExplicitLocals pass which removes the ARGUMENT pseudo instructions did
not update the associated DBG_VALUEs, and couldn't even find these values since the code
assumed such instructions are adjacent, which is not the case here.

Also fixed asm printing of TIs needed by a test.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94140

Files:
  lld/test/wasm/debuginfo.test
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
  llvm/test/CodeGen/WebAssembly/dbgvalue.ll
  llvm/test/MC/WebAssembly/debug-byval-struct.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94140.314756.patch
Type: text/x-patch
Size: 12314 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210106/198b16f4/attachment.bin>


More information about the llvm-commits mailing list