Add support for salvaging debug info from icmp instrcuctions.
authorShubham Sandeep Rastogi <srastogi22@apple.com>
Fri, 5 May 2023 00:48:19 +0000 (17:48 -0700)
committerShubham Sandeep Rastogi <srastogi22@apple.com>
Tue, 23 May 2023 22:31:31 +0000 (15:31 -0700)
commit775258d758dd6d3594c96cd79f60bd4382140294
tree7556364da7938fb9c775c5c5f924bdb108a625cb
parent75632fec58b83a19cf4dc818931f452cff708822
Add support for salvaging debug info from icmp instrcuctions.

salvageDebugInfo is a function that allows us to reatin debug info for
instructions that have been optimized out. Currently, it doesn't support
salvaging the debug information from icmp instrcutions, but DWARF
expressions can emulate an icmp by using the DWARF conditional
expressions. This patch adds support for salvaging debug information
from icmp instructions.

Differential Revision: https://reviews.llvm.org/D150216
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/DebugInfo/X86/dbg_value_list_emission.mir
llvm/test/DebugInfo/X86/debug_value_list_selectiondag.ll
llvm/test/DebugInfo/salvage-icmp.ll [new file with mode: 0644]