[all-commits] [llvm/llvm-project] bb1b0b: [DebugInfo] Correctly handle salvaged casts and sp...

Stephen Tozer via All-commits all-commits at lists.llvm.org
Wed Dec 18 03:17:36 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bb1b0bc4e57428ce364d3d6c075ff03cb8973462
      https://github.com/llvm/llvm-project/commit/bb1b0bc4e57428ce364d3d6c075ff03cb8973462
  Author: stozer <stephen.tozer at sony.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    A llvm/test/CodeGen/ARM/fragmented-args-multiple-regs.ll
    M llvm/test/DebugInfo/X86/dbg-value-dropped-instcombine.ll
    A llvm/test/DebugInfo/salvage-cast-debug-info.ll
    M llvm/test/Transforms/EarlyCSE/debug-info-undef.ll
    M llvm/test/Transforms/InstCombine/cast-mul-select.ll
    M llvm/test/Transforms/InstCombine/pr43893.ll
    M llvm/test/Transforms/InstCombine/unavailable-debug.ll

  Log Message:
  -----------
  [DebugInfo] Correctly handle salvaged casts and split fragments at ISel

Previously, LLVM had no functional way of performing casts inside of a
DIExpression(), which made salvaging cast instructions other than Noop
casts impossible. This patch enables the salvaging of casts by using the
DW_OP_LLVM_convert operator for SExt and Trunc instructions.

There is another issue which is exposed by this fix, in which fragment
DIExpressions (which are preserved more readily by this patch) for
values that must be split across registers in ISel trigger an assertion,
as the 'split' fragments extend beyond the bounds of the fragment
DIExpression causing an error. This patch also fixes this issue by
checking the fragment status of DIExpressions which are to be split, and
dropping fragments that are invalid.




More information about the All-commits mailing list