[all-commits] [llvm/llvm-project] f5e1b7: [DebugInfo] MachineSink: find more DBG_VALUEs to sink

Jeremy Morse via All-commits all-commits at lists.llvm.org
Mon Oct 28 07:33:23 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f5e1b718a675a4449b71423f04d38e1e93045105
      https://github.com/llvm/llvm-project/commit/f5e1b718a675a4449b71423f04d38e1e93045105
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M llvm/lib/CodeGen/MachineSink.cpp
    A llvm/test/DebugInfo/MIR/X86/machinesink.mir

  Log Message:
  -----------
  [DebugInfo] MachineSink: find more DBG_VALUEs to sink

In the Pre-RA machine sinker, previously we were relying on all DBG_VALUEs
being immediately after the instruction that defined their operands. This
isn't a valid assumption, as a variable location change doesn't
necessarily correspond to where the value is computed. In this patch, we
collect DBG_VALUEs that might need sinking as we walk through a block,
and sink all of them if their defining instruction is sunk.

This patch adds some copy propagation too, so that if we sink a copy inst,
the now non-dominated paths can use the copy source for the variable
location.

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




More information about the All-commits mailing list