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

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 04:44:15 PST 2019


dstenb added a comment.

Some nitpicks.



================
Comment at: docs/SourceLevelDebugging.rst:398
+In the example above, every variable assignment uniquely corresponds to a
+memory store to the variables position on the stack. However in heavily
+optimized code LLVM promotes most variables into SSA values, which can
----------------
nit: variable**'**s


================
Comment at: docs/SourceLevelDebugging.rst:408
+* The dbg.value's position in the IR defines where in the instruction stream
+  the variables value changes.
+* Operands can be constant valued, indicating the variable is assigned a
----------------
nit: variable**'**s


================
Comment at: docs/SourceLevelDebugging.rst:432
+operand ``undef`` should be used, to terminate earlier variable locations and let the debugger
+present ``optimized out`` to the developer. Witholding these potentially stale
+variable valuations from the developer diminishes the amount of available debug
----------------
nit: Wit**h**holding


================
Comment at: docs/SourceLevelDebugging.rst:474
+    %addoper = select i1 %cond, i32 11, i32 12
+    %plusten = add i32 %merge, %addoper
+    %toret = add i32 %plusten, %g
----------------
`%merge` -> `%bar` ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58726/new/

https://reviews.llvm.org/D58726





More information about the llvm-commits mailing list