[PATCH] D83054: [LiveDebugValues] 4/4 Initial test changes for InstrRef LiveDebugValues

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 08:05:48 PDT 2020


jmorse created this revision.
jmorse added reviewers: aprantl, vsk, probinson, Orlando, StephenTozer, TWeaver, djtodoro.
Herald added subscribers: llvm-commits, atanasyan, jrtc27, sdardis, qcolombet.
Herald added a project: LLVM.
jmorse added a parent revision: D83048: [LiveDebugValues] 3/4 Add Xclang and CodeGen options for using instr-ref variable locations.

(Context: this thread http://lists.llvm.org/pipermail/llvm-dev/2020-June/142368.html )

This patch contains a bunch of test changes to account for changes in output from the new instruction-referencing LiveDebugValues. It doesn't make all tests pass if you manually demand the new LiveDebugValues -- there are still some limitations, for example I haven't attempted entry values (yet). IMHO, it's Good Enough (TM) to be in-tree, even if it isn't 100% complete yet.

About 85% of the changes here are to CHECK lines that have a trailing !debug-location: InstrRef LDV generates a DILocation for new DBG_VALUEs with only a scope, instead of copying a previous DBG_VALUEs DebugLoc, and that leads to the location being printed as:

  !debug-location !DILocation(line: 0, blah blah)

instead of

  !debug-location !1234

The changes in this patch just chop off the !debug-location check. I guess it's arguable as to what kind of DebugLoc we want for propagated DBG_VALUEs. At the very least though, they don't affect output DWARF.

This patch additionally fiddles with:

- kill-after-spill.mir , where I've added a source location to each block in the program. InstrRef LDV refuses to propagate variable locations as far as the old one did, when the variables are out of scope,
- live-debug-values-bad-transfer.mir where a known bug/limitation has been fixed, I've added instrref-and-varloc expected outputs to test for.

Finally I've added two new tests:

- livedebugvalues_load_in_loop.mir , which shows off some multiple-location value tracking in action on a totally contrived input,
- livedebugvalues_many_loop_heads.mir , which demonstrates a pathological input to InstrRef LDV, as explained in the test file comment.

I've got a list of other inputs that InstrRef LDV finds difficult and want coverage, but they're not submittable-quality yet.  I felt it was important to get this out now and add additional tests later, if people are happy with that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83054

Files:
  llvm/test/DebugInfo/MIR/Mips/last-inst-bundled.mir
  llvm/test/DebugInfo/MIR/X86/kill-after-spill.mir
  llvm/test/DebugInfo/MIR/X86/live-debug-values-3preds.mir
  llvm/test/DebugInfo/MIR/X86/live-debug-values-bad-transfer.mir
  llvm/test/DebugInfo/MIR/X86/live-debug-values.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues-ignores-metaInstructions.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_match_clobber.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_match_move.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_one_clobber.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_one_move.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_loop.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb_clobbered.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb_move_to_clobber.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_load_in_loop.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_break.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_diamond.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_diamond_move.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_two_backedge.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop_moved.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop_outer_moved.mir
  llvm/test/DebugInfo/MIR/X86/livedebugvalues_many_loop_heads.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83054.275113.patch
Type: text/x-patch
Size: 41192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/f8349978/attachment.bin>


More information about the llvm-commits mailing list