[all-commits] [llvm/llvm-project] fda430: [DebugInfo][InstrRef] Add a size operand to DBG_PHI

Jeremy Morse via All-commits all-commits at lists.llvm.org
Mon Apr 25 05:42:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fda4305e5378478051be225248bfe9c1d401d938
      https://github.com/llvm/llvm-project/commit/fda4305e5378478051be225248bfe9c1d401d938
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2022-04-25 (Mon, 25 Apr 2022)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
    M llvm/lib/CodeGen/LiveDebugVariables.cpp
    A llvm/test/DebugInfo/MIR/InstrRef/dbg-phis-in-ldv2.mir
    A llvm/test/DebugInfo/MIR/InstrRef/phi-on-stack-coalesced.mir
    A llvm/test/DebugInfo/MIR/InstrRef/phi-on-stack-coalesced2.mir
    M llvm/test/DebugInfo/MIR/InstrRef/phi-regallocd-to-stack.mir

  Log Message:
  -----------
  [DebugInfo][InstrRef] Add a size operand to DBG_PHI

DBG_PHI instructions can refer to stack slots, to indicate that multiple
values merge together on control flow joins in that slot. This is fine --
however the slot might be merged at a later date with a slot of a different
size. In doing so, we lose information about the size the eliminated PHI.
Later analysis passes have to guess.

Improve this by attaching an optional "bit size" operand to DBG_PHI, which
only gets added for stack slots, to let us know how large a size the value
on the stack is.

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




More information about the All-commits mailing list