[PATCH] D78818: [WebAssembly] Fix debug_value's when registers are stackified.

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 10:48:31 PDT 2020


aardappel created this revision.
aardappel added reviewers: dschuff, tlively, yurydelendik, sunfish.
Herald added subscribers: llvm-commits, aheejin, hiraditya, jgravelle-google, sbc100.
Herald added a project: LLVM.
aardappel added a comment.

Uploading this for early feedback to see if this goes the right direction.

This correctly outputs a `DW_AT_location` of the correct type `TI_OPERAND_STACK` where previously there was nothing being output at all (because the `debug_value` referred to an orphan register). Only tested for the simplest case of one def + one use.

Besides tests, this does not update the PC range, which is currently incorrect. The range should probably just be shrunk to exactly the PC just between the def and use.

Also entirely not sure if my calls to `replaceWithStackOffset` are a) operating on the correct `debug_value`s and b) have the correct stack offset. This in particular needs tests. Anyone familiar with `WebAssemblyRegStackify` would love to hear if you think I am capturing the various cases correctly. Also one case where we un-stackify.


This is a WiP for review, missing tests etc.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78818

Files:
  llvm/lib/Target/WebAssembly/WebAssembly.h
  llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.h
  llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78818.259921.patch
Type: text/x-patch
Size: 7989 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200424/7f316aa6/attachment.bin>


More information about the llvm-commits mailing list