[all-commits] [llvm/llvm-project] 60db26: [LiveDebugValues][NFC] Add instr-ref tests, adapt ...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Aug 26 08:34:28 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 60db26a66d5346b2feae279f6c928bde48078893
      https://github.com/llvm/llvm-project/commit/60db26a66d5346b2feae279f6c928bde48078893
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2020-08-26 (Wed, 26 Aug 2020)

  Changed paths:
    A llvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_downgradefeedback_loop.mir
    A llvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_insensitive_downgrade.mir
    A llvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_path_lengths.mir
    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
    A llvm/test/DebugInfo/MIR/X86/livedebugvalues_load_in_loop.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
    A llvm/test/DebugInfo/MIR/X86/livedebugvalues_many_loop_heads.mir

  Log Message:
  -----------
  [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