[all-commits] [llvm/llvm-project] fb6596: [DebugInfo][InstrRef] Avoid a crash from mixed var...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Apr 6 03:56:09 PDT 2022


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

  Changed paths:
    M llvm/include/llvm/CodeGen/FastISel.h
    M llvm/include/llvm/CodeGen/SelectionDAG.h
    M llvm/include/llvm/CodeGen/SelectionDAGISel.h
    M llvm/lib/CodeGen/MachineFunction.cpp
    M llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
    M llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
    M llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
    M llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
    M llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    A llvm/test/DebugInfo/X86/instr-ref-opt-bisect.ll

  Log Message:
  -----------
  [DebugInfo][InstrRef] Avoid a crash from mixed variable location modes

Variable locations now come in two modes, instruction referencing and
DBG_VALUE. At -O0 we pick DBG_VALUE to allow fast construction of variable
information. Unfortunately, SelectionDAG edits the optimisation level in
the presence of opt-bisect-limit, meaning different passes have different
views of what variable location mode we should use. That causes assertions
when they're mixed.

This patch plumbs through a boolean in SelectionDAG from start to
instruction emission, so that we don't rely on the current optimisation
level for correctness.

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




More information about the All-commits mailing list