[all-commits] [llvm/llvm-project] 43de30: [DebugInfo][InstrRef] Fix a tombstone-in-DenseMap ...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Feb 2 07:09:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 43de305704a50983bf134d8fb916f752a02eb076
      https://github.com/llvm/llvm-project/commit/43de305704a50983bf134d8fb916f752a02eb076
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
    M llvm/test/DebugInfo/MIR/InstrRef/single-assign-propagation.mir

  Log Message:
  -----------
  [DebugInfo][InstrRef] Fix a tombstone-in-DenseMap crash from D117877

This is a follow-up to D117877: variable assignments of DBG_VALUE $noreg,
or DBG_INSTR_REFs where no value can be found, are represented by a
DbgValue object with Kind "Undef", explicitly meaning "there is no value".
In D117877 I added a special-case to some assignment accounting faster,
without considering this scenario. It causes variables to be given the
value ValueIDNum::EmptyValue, which then ends up being a DenseMap key. The
DenseMap asserts, because EmptyValue is the tombstone key.

Fix this by handling the assign-undef scenario in the special case, to
match what happens in the general case: the variable has no value if it's
only ever assigned $noreg / undef.

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




More information about the All-commits mailing list