[llvm-dev] Notes from dbg.value coffee chat

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 13 13:17:55 PDT 2020


On Mon, Oct 12, 2020 at 9:13 AM Cazalet-Hyams, Orlando <
orlando.hyams at sony.com> wrote:

> The "static allocas are special" [3] approach is appealing because it
> seems like it may give promising results without too much work (compared
> with these other ideas, anyway). It does rely on passes to provide
> debug-info correctness, but tooling may be an appropriate stand in for
> correctness by default if we decide to go down this route. Did you have
> anything in mind for this?
>

All I had in mind was something like:
- add a pass that finds all "local variable stores" (stores to a static
alloca used by a dbg.declare), and inserts markers (llvm.donothing?)
carrying the local variable metadata after every such store
- after optimization, check that every marker is preceded by either a store
to a local variable of a dbg.value for the same local variable. Any marker
with no dbg.value or store before it is a bug, unless the variable is
available nowhere (I forget how that is represented)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201013/13e814ce/attachment.html>


More information about the llvm-dev mailing list