[all-commits] [llvm/llvm-project] ec7b9b: [InstCombine] Avoid redundant or out-of-order debu...

Stephen Tozer via All-commits all-commits at lists.llvm.org
Fri Feb 26 05:14:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec7b9b0c18bb9c9669231bdfa71b0aa7a71140c1
      https://github.com/llvm/llvm-project/commit/ec7b9b0c18bb9c9669231bdfa71b0aa7a71140c1
  Author: Stephen Tozer <Stephen.Tozer at Sony.com>
  Date:   2021-02-26 (Fri, 26 Feb 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/debuginfo-sink.ll
    M llvm/test/Transforms/InstCombine/debuginfo_add.ll

  Log Message:
  -----------
  [InstCombine] Avoid redundant or out-of-order debug value sinking

This patch modifies TryToSinkInstruction in the InstCombine pass, to prevent
redundant debug intrinsics from being produced, and also prevent the intrinsics
from being emitted in an incorrect order. It does this by ensuring that when
this pass sinks an instruction and creates clones of the debug intrinsics that
use that instruction, it inserts those debug intrinsics in their original order,
and only inserts the last debug intrinsic for each variable in the Instruction's
block.

Differential revision: https://reviews.llvm.org/D95463




More information about the All-commits mailing list