[all-commits] [llvm/llvm-project] 06758c: [DebugInfo] Improve dbg preservation in LSR.

elavkje via All-commits all-commits at lists.llvm.org
Thu Oct 8 04:20:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 06758c6a6135f59deec8e73d4fcb69946ab47f54
      https://github.com/llvm/llvm-project/commit/06758c6a6135f59deec8e73d4fcb69946ab47f54
  Author: Markus Lavin <markus.lavin at ericsson.com>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/ScalarEvolution.h
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
    M llvm/test/DebugInfo/COFF/fpo-shrink-wrap.ll
    A llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-0.ll

  Log Message:
  -----------
  [DebugInfo] Improve dbg preservation in LSR.

Use SCEV to salvage additional @llvm.dbg.value that have turned into
referencing undef after transformation (and traditional
salvageDebugInfo). Before transformation compute SCEV for each
@llvm.dbg.value in the loop body and store it (along side its current
DIExpression). After transformation update those @llvm.dbg.value now
referencing undef by comparing its stored SCEV to the SCEV of the
current loop-header PHI-nodes. Allow match with offset by inserting
compensation code in the DIExpression.

Includes fix for the nullptr deref that caused the original commit
to be reverted in 9d63029770.

Fixes : PR38815

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




More information about the All-commits mailing list