[PATCH] D57328: [DebugInfo][DAG] Always emit DBG_VALUEs of FrameIndexes regardless of their SDNodes

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 09:10:19 PST 2019


jmorse updated this revision to Diff 183884.
jmorse added a comment.

Make use of auto, add constant-value dbg.value's to test for their correct ordering with FrameIndex dbg.values.

Adrian wrote:

> If a dbg.value pointing to a frame index and a dbg.value with a constant (both describing the same variable) appear in the same basic block, is the relative order between them lost?

The order should not be lost -- they will both retain their IR location number, and ScheduleDAGSDNodes::EmitSchedule should emit them in that numbered order. I think the worst case scenario is that intervening instructions are completely optimised out, but even in that case they will still retain their ordering.

I've added a couple of constant dbg.values to the new test to check the ordering is preserved.


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

https://reviews.llvm.org/D57328

Files:
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  test/DebugInfo/NVPTX/dbg-value-const-byref.ll
  test/DebugInfo/X86/dbg-value-frame-index-2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57328.183884.patch
Type: text/x-patch
Size: 5104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190128/65dff9ce/attachment.bin>


More information about the llvm-commits mailing list