llvm-project/llvm/test
Vladislav Dzhidzhoev facb3ac385 [GlobalISel][DebugInfo] salvageDebugInfo analogue for gMIR
Salvage debug info of instruction that is about to be deleted as dead in
Combiner pass. Currently supported instructions are COPY and G_TRUNC.

It allows to salvage debug info of some dead arguments of functions, by putting
DWARF expression corresponding to the instruction being deleted into related
DBG_VALUE instruction.

Here is an example of missing variables location https://godbolt.org/z/K48osb9dK.
We see that arguments x, y of function foo are not available in debugger, and
corresponding DBG_VALUE instructions have undefined register operand instead of
variables locaton after Aarch64PreLegalizerCombiner pass. The reason is that
registers where variables are located are removed as dead (with instruction
G_TRUNC). We can use salvageDebugInfo analogue for gMIR to preserve debug
locations of dead variables.

Statistics of llvm object files built with vs without this commit on -O2
optimization level (CMAKE_BUILD_TYPE=RelWithDebInfo, -fglobal-isel) on Aarch64 (macOS):

Number of variables with 100% of parent scope covered by DW_AT_location has been increased by 7,9%.
Number of variables with 0% coverage of parent scope has been decreased by 1,2%.
Number of variables processed by location statistics has been increased by 2,9%.
Average PC ranges coverage has been increased by 1,8 percentage points.

Coverage can be improved by supporting more instructions, or by calling
salvageDebugInfo for instructions that are deleted during Combiner rules exection.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D129909
2022-08-01 11:14:53 +02:00
..
Analysis [AA] Do not track Must in ModRefInfo 2022-08-01 07:14:31 +02:00
Assembler [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
Bindings [IR] Remove support for float binop constant expressions 2022-07-12 09:40:49 +02:00
Bitcode [LegacyPM] Remove NameAnonGlobalLegacyPass 2022-07-17 14:38:29 -07:00
BugPoint
CodeGen [GlobalISel][DebugInfo] salvageDebugInfo analogue for gMIR 2022-08-01 11:14:53 +02:00
DebugInfo [GlobalISel][DebugInfo] salvageDebugInfo analogue for gMIR 2022-08-01 11:14:53 +02:00
Demangle
Examples [Examples] Fix SimplifyCFG example 2022-08-01 07:22:35 +02:00
ExecutionEngine [JITLink][COFF] Handle COMDAT symbol with offset. 2022-07-31 09:09:48 +09:00
Feature [WinEH] Apply funclet operand bundles to nounwind intrinsics that lower to function calls in the course of IR transforms 2022-07-26 17:52:43 +02:00
FileCheck
Instrumentation [ASan] Use stack safety analysis to optimize allocas instrumentation. 2022-07-26 18:48:16 -07:00
Integer
JitListener
LTO [libLTO] Set data-sections by default in libLTO. 2022-07-27 09:39:39 -05:00
Linker [IR] Allow absence for Min module flags and make AArch64 BTI/PAC-RET flags backward compatible 2022-07-18 09:35:12 -07:00
MC [AMDGPU] Enable image_gather4h instruction for gfx10 and gfx11 2022-07-29 15:42:06 +02:00
MachineVerifier
Object [AIX] support read global symbol of big archive 2022-07-18 10:43:30 -04:00
ObjectYAML [obj2yaml] Add -o to specify output filename 2022-07-14 00:32:48 -07:00
Other [MachineFunctionPass] Support -print-changed and -print-changed=quiet 2022-07-26 10:16:49 -07:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen [TableGen] Add a location for a class definition that was forward-declared 2022-07-20 15:56:17 +02:00
ThinLTO/X86 [WPD] Use new llvm.public.type.test intrinsic for potentially publicly visible classes 2022-07-26 08:01:08 -07:00
Transforms [LV] Add additional tests with multiple chained recurrences. 2022-08-01 10:01:19 +01:00
Unit
Verifier [MemProf] Basic metadata support and verification 2022-07-20 15:30:55 -07:00
YAMLParser
tools Revert D130458 "[llvm-objcopy] Support --{,de}compress-debug-sections for zstd" 2022-07-29 15:46:51 -07:00
.clang-format
CMakeLists.txt [Reland][Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF. 2022-07-19 15:11:36 +03:00
TestRunner.sh
lit.cfg.py [llvm-ar] Add object mode option -X for AIX 2022-07-22 09:55:21 -04:00
lit.site.cfg.py.in [llvm] add zstd to `llvm::compression` namespace 2022-07-19 10:54:36 -07:00