llvm-project/llvm/lib/CodeGen/LiveDebugValues
Djordje Todorovic 86f5288eae [LiveDebugValues] Cleanup Transfers when removing Entry Value
If we encounter a new debug value, describing the same parameter,
we should stop tracking the parameter's Entry Value. At that point,
in some cases, the Transfer which uses the parameter's Entry Value,
is already emitted. Thanks to the RemoveRedundantDebugValues pass,
many problems with incorrect instruction order and number of DBG_VALUEs
are fixed. However, we still cannot rely on the rule that each new
debug value is set by the previous non-debug instruction in Machine
Basic Block.

When new parameter debug value triggers removal of Backup Entry Value
for the same parameter, do the cleanup of Transfers emitted from Backup
Entry Values. Get the Transfer Instruction which created the new debug
value and search for debug values already emitted from the to-be-deleted
Backup Entry Value and attached to the Transfer Instruction. If found,
delete the Transfer and remove "primary" Entry Value Var Loc from
OpenRanges.

This patch fixes PR47628.

Patch by Nikola Tesic.

Differential revision: https://reviews.llvm.org/D106856
2021-08-30 14:00:41 +02:00
..
InstrRefBasedImpl.cpp [DebugInfo][InstrRef] Correctly ignore DBG_VALUE_LIST in InstrRef mode 2021-08-20 14:51:02 +01:00
LiveDebugValues.cpp [DebugInfo][InstrRef] Don't use instr-ref for unoptimised functions 2021-08-25 15:10:36 +01:00
LiveDebugValues.h [DebugInfo][InstrRef] Honour too-much-debug-info cutouts 2021-08-17 11:34:49 +01:00
VarLocBasedImpl.cpp [LiveDebugValues] Cleanup Transfers when removing Entry Value 2021-08-30 14:00:41 +02:00