[all-commits] [llvm/llvm-project] 4782ac: [DebugInfo][RemoveDIs] Use splice in Outliner rath...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Tue Jan 23 08:24:02 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4782ac8dd3cfa96e14ad4eff1389bbcfda27240f
      https://github.com/llvm/llvm-project/commit/4782ac8dd3cfa96e14ad4eff1389bbcfda27240f
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2024-01-23 (Tue, 23 Jan 2024)

  Changed paths:
    M llvm/lib/Transforms/IPO/IROutliner.cpp
    M llvm/test/Transforms/IROutliner/legal-debug.ll

  Log Message:
  -----------
  [DebugInfo][RemoveDIs] Use splice in Outliner rather than moveBefore (#79124)

This patch replaces a utility in the outliner that moves the contents of
one basic block into another basic block, with a call to splice instead.
I think it's NFC, however I'd like a second pair of eyes to look at it
just in case.

The reason for doing this is an edge case in the handling of DPValue
objects, the replacement for dbg.values. If there's a variable
assignment "dangling" at the end of a block (which happens when we
delete the terminator), inserting instructions at end() doesn't shift
the DPValue up into the block. We could probably fix this; but it's much
easier to use splice at the only call site that does this.

Patch adds --try-experimental-debuginfo-iterators to a test to exercise
this code path.




More information about the All-commits mailing list