[all-commits] [llvm/llvm-project] 9232ca: Improve the effectiveness of BDCE's debug info sal...

adrian-prantl via All-commits all-commits at lists.llvm.org
Thu Sep 30 09:29:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9232ca4712cf3f3a99a8cd095165241daf0ddc4e
      https://github.com/llvm/llvm-project/commit/9232ca4712cf3f3a99a8cd095165241daf0ddc4e
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2021-09-30 (Thu, 30 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/BDCE.cpp
    M llvm/test/Transforms/Util/salvage-debuginfo.ll

  Log Message:
  -----------
  Improve the effectiveness of BDCE's debug info salvaging

This patch improves the effectiveness of BDCE's debug info salvaging
by processing the instructions in reverse order and delaying
dropAllReferences until after debug info salvaging. This allows
salvaging of entire chains of deleted instructions!

Previously we would remove all references from an instruction, which
would make it impossible to use that instruction to salvage a later
instruction in the instruction stream, because its operands were
already removed.

This reapplies the previous patch with a fix for a use-after-free.

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




More information about the All-commits mailing list