[PATCH] D82129: [DebugInfo] Drop location ranges for variables which exist entirely outside the variable's scope

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 06:53:42 PDT 2020


jmorse added a comment.

FWIW: I'd enjoy this patch landing. AFAIUI there's no meaningful information communicated to the DWARF consumers by out-of-scope ranges (even if it indicates a compiler bug somewhere), and we may as well save them disk space and debugger-load-time.

If we're looking to make no-out-of-scope-ranges a verification property, it's probably best to use this code to produce warnings, then errors, then push further up the compilation pipeline. I'd much prefer connecting source/variable locations and designing this problem out, though.



================
Comment at: llvm/test/DebugInfo/X86/trim-var-locs.mir:116
+    $edi = MOV32ri 8, debug-location !15
+    ; scoope block !24 start and end range 2
+    $edi = MOV32ri 9, debug-location !26
----------------
nit: scooooope


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

https://reviews.llvm.org/D82129





More information about the llvm-commits mailing list