[PATCH] D77784: [WebAssembly] Use dummy debug info in Emscripten SjLj

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 02:40:57 PDT 2020


aheejin created this revision.
aheejin added a reviewer: dschuff.
Herald added subscribers: llvm-commits, sunfish, hiraditya, jgravelle-google, sbc100, aprantl.
Herald added a project: LLVM.
aheejin updated this revision to Diff 256221.
aheejin added a comment.
aheejin marked an inline comment as done.

Small fix



================
Comment at: llvm/test/CodeGen/WebAssembly/lower-em-sjlj-debuginfo.ll:10
+; 'malloc' and 'free' calls take debug info from the next instruction.
+define void @setjmp_debug_info0() !dbg !3 {
+; CHECK-LABEL: @setjmp_debug_info0
----------------
This function was just moved from lower-em-sjlj.ll.


D74269 <https://reviews.llvm.org/D74269> added debug info to newly created instructions, including calls
to `malloc` and `free`, by taking debug info from existing instructions
around, whose debug info may or may not be empty.

But there are cases debug info is required by the IR verifier: when both
the caller and the callee functions have DISubprograms, meaning we
already have declarations to `malloc` or `free` with a DISubprogram
attached, newly created calls to `malloc` and `free` should have
non-empty debug info. This patch creates a non-empty dummy debug info in
this case to those calls to make the IR verifier pass.

Fixes https://bugs.llvm.org/show_bug.cgi?id=45461.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77784

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
  llvm/test/CodeGen/WebAssembly/lower-em-sjlj-debuginfo.ll
  llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77784.256221.patch
Type: text/x-patch
Size: 8356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200409/744beab0/attachment-0001.bin>


More information about the llvm-commits mailing list