SuccessChanges

Summary

  1. Reland [DebugInfo] Improve dbg preservation in LSR. (details)
Commit 2a6782bb9f1d6843ab6e147765c1cdd7ee5eb90a by markus.lavin
Reland [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 rewrite (but after introduction of new
induction variables) use SCEV to compute an equivalent set of values for
each @llvm.dbg.value in the loop body (among the loop header PHI-nodes).
After rewrite (and dead PHI elimination) update those @llvm.dbg.value
now referencing undef by picking a remaining value from its equivalence
set.  Allow match with offset by inserting compensation code in the
DIExpression.

Fixes : PR38815

Differential Revision: https://reviews.llvm.org/D87494
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
The file was modifiedllvm/test/DebugInfo/COFF/fpo-shrink-wrap.ll
The file was addedllvm/test/Transforms/LoopStrengthReduce/dbg-preserve-0.ll
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h