[all-commits] [llvm/llvm-project] 0caeaf: [LiveDebugValues][NFC] Re-land 60db26a66d, add ins...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Fri Sep 11 04:15:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0caeaff123768020c7b0e1a648d6b6ba67ad6d87
      https://github.com/llvm/llvm-project/commit/0caeaff123768020c7b0e1a648d6b6ba67ad6d87
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2020-09-11 (Fri, 11 Sep 2020)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
    M llvm/test/DebugInfo/MIR/Mips/last-inst-bundled.mir
    M llvm/test/DebugInfo/MIR/X86/kill-after-spill.mir
    M llvm/test/DebugInfo/MIR/X86/live-debug-values-3preds.mir
    M llvm/test/DebugInfo/MIR/X86/live-debug-values-bad-transfer.mir
    M llvm/test/DebugInfo/MIR/X86/live-debug-values.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues-ignores-metaInstructions.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_match_clobber.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_match_move.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_one_clobber.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_diamond_one_move.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_basic_loop.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb_clobbered.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_bb_to_bb_move_to_clobber.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_break.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_diamond.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_diamond_move.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_two_backedge.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop_moved.mir
    M llvm/test/DebugInfo/MIR/X86/livedebugvalues_loop_within_loop_outer_moved.mir

  Log Message:
  -----------
  [LiveDebugValues][NFC] Re-land 60db26a66d, add instr-ref tests

This was landed but reverted in 5b9c2b1bea7 due to asan picking up a memory
leak. This is fixed in the change to InstrRefBasedImpl.cpp. Original
commit message follows:

[LiveDebugValues][NFC] Add instr-ref tests, adapt old tests

This patch adds a few tests in DebugInfo/MIR/InstrRef/ of interesting
behaviour that the instruction referencing implementation of
LiveDebugValues has. Mostly, these tests exist to ensure that if you
give the "-experimental-debug-variable-locations" command line switch,
the right implementation runs; and to ensure it behaves the same way as
the VarLoc LiveDebugValues implementation.

I've also touched roughly 30 other tests, purely to make the tests less
rigid about what output to accept. DBG_VALUE instructions are usually
printed with a trailing !debug-location indicating its scope:

  !debug-location !1234

However InstrRefBasedLDV produces new DebugLoc instances on the fly,
meaning there sometimes isn't a numbered node when they're printed,
making the output:

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

Which causes a ton of these tests to fail. This patch removes checks for
that final part of each DBG_VALUE instruction. None of them appear to
be actually checking the scope is correct, just that it's present, so
I don't believe there's any loss in coverage here.

Differential Revision: https://reviews.llvm.org/D83054




More information about the All-commits mailing list