[PATCH] D58726: [DebugInfo][Docs] Explicitly document how dbg.value intrinsics are interpreted in optimized code

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 09:48:54 PST 2019


jmorse created this revision.
jmorse added reviewers: probinson, aprantl, bjope, vsk.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.

As discussed in D58453 <https://reviews.llvm.org/D58453>, the interpretation of dbg.value intrinsics and how they should be treated in optimized code isn't very well documented at the moment. This patch adds a section, ``Object lifetime in optimized code'' to the source level debugging documentation, that documents how such intrinsics are Supposed To (TM) be handled. This may be a can of worms because not everyone may agree that this is how they're interpreted.

Further documentation can be added, but what I wanted to get out there at this point is:

- dbg.values terminate earlier locations and their position in the instruction stream is significant, and
- that it's better to make a variable read ``optimized out'' than it is to present a state (set of variable valuations) that misrepresents the program,

which if we can agree on, will be Progress (TM).

Note that I haven't written any restructured text before :o


Repository:
  rL LLVM

https://reviews.llvm.org/D58726

Files:
  docs/SourceLevelDebugging.rst

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58726.188572.patch
Type: text/x-patch
Size: 4844 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190227/905e876b/attachment.bin>


More information about the llvm-commits mailing list