[PATCH] D63083: [DebugInfo][Docs] Document that prologue/epilogue variable location changes are ignored

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 01:50:14 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL363654: [DebugInfo][Docs] Document that prologue/epilogue variable location changes areā€¦ (authored by jmorse, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D63083?vs=204012&id=205270#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D63083

Files:
  llvm/trunk/docs/SourceLevelDebugging.rst


Index: llvm/trunk/docs/SourceLevelDebugging.rst
===================================================================
--- llvm/trunk/docs/SourceLevelDebugging.rst
+++ llvm/trunk/docs/SourceLevelDebugging.rst
@@ -531,6 +531,7 @@
 variable to their machine locations over ranges of instructions.
 From IR to object emission, the major transformations which affect variable
 location fidelity are:
+
 1. Instruction Selection
 2. Register allocation
 3. Block layout
@@ -539,6 +540,14 @@
 significantly change the ordering of the program, and occurs in a number of
 different passes.
 
+Some variable locations are not transformed during CodeGen. Stack locations
+specified by ``llvm.dbg.declare`` are valid and unchanging for the entire
+duration of the function, and are recorded in a simple MachineFunction table.
+Location changes in the prologue and epilogue of a function are also ignored:
+frame setup and destruction may take several instructions, require a
+disproportionate amount of debugging information in the output binary to
+describe, and should be stepped over by debuggers anyway.
+
 Variable locations in Instruction Selection and MIR
 ---------------------------------------------------
 
@@ -573,10 +582,10 @@
   DBG_VALUE %1, $noreg, !123, !DIExpression()
 
 And have the following operands:
- * The first operand can record the variable location as a register, an
-   immediate, or the base address register if the original debug intrinsic
-   referred to memory. ``$noreg`` indicates the variable location is undefined,
-   equivalent to an ``undef`` dbg.value operand.
+ * The first operand can record the variable location as a register,
+   a frame index, an immediate, or the base address register if the original
+   debug intrinsic referred to memory. ``$noreg`` indicates the variable
+   location is undefined, equivalent to an ``undef`` dbg.value operand.
  * The type of the second operand indicates whether the variable location is
    directly referred to by the DBG_VALUE, or whether it is indirect. The
    ``$noreg`` register signifies the former, an immediate operand (0) the


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63083.205270.patch
Type: text/x-patch
Size: 2111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190618/d76cce47/attachment.bin>


More information about the llvm-commits mailing list