llvm-project/llvm/lib/Transforms
Stephen Tozer 140757bfaa [DebugInfo] Prevent invalid debug info being produced during LoopStrengthReduce
During LoopStrengthReduce, some of the SSA values that are used by debug values
may be lost and/or salvaged. After LSR we attempt to recover any undef debug
values, including any that were salvaged but then lost their values afterwards,
by replacing the lost values with any live equal values (plus a possible
constant offset) that have been gathered prior to running LSR. When we do this
we restore the debug value's original DIExpression, to undo any salvaging (as we
have gone back to using the original debug value).

This process can currently produce invalid debug info if the number of operands
has changed by salvaging during LSR. Replacing old values during the
applyEqualValues step does not change the number of location operands, which
means that when we restore the old DIExpression we may have a mismatch between
the number of operands used by the debug value and the number of operands
referenced by the DIExpression. This patch fixes this by restoring the full
original location metadata at the start of the applyEqualValues step, so that
there is no mismatch in operand count between the debug value and its
DIExpression.

Differential Revision: https://reviews.llvm.org/D98644
2021-04-08 13:04:48 +01:00
..
AggressiveInstCombine [Transforms] Use llvm::append_range (NFC) 2021-01-20 21:35:54 -08:00
CFGuard llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Coroutines [SplitEdge] Update SplitCriticalEdge to return a nullptr only when the edge is not critical 2021-04-06 21:24:40 +00:00
Hello
IPO [CSSPGO] Fix incorrect probe distribution factor computation in top-down inliner 2021-04-07 08:48:59 -07:00
InstCombine [InstCombine] fold not ops around min/max intrinsics 2021-04-07 17:31:36 -04:00
Instrumentation [ASan][RISCV] Fix RISC-V memory mapping 2021-04-06 20:46:17 +01:00
ObjCARC Move ObjCARCUtil.h back to llvm/Analysis 2021-03-08 16:35:24 -08:00
Scalar [DebugInfo] Prevent invalid debug info being produced during LoopStrengthReduce 2021-04-08 13:04:48 +01:00
Utils [SplitEdge] Update SplitCriticalEdge to return a nullptr only when the edge is not critical 2021-04-06 21:24:40 +00:00
Vectorize [LV] Logical and/or select costs 2021-04-08 10:39:47 +01:00
CMakeLists.txt [NewPM][HelloWorld] Move HelloWorld to Utils 2021-02-03 12:59:40 -08:00