As discussed in 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