llvm-project/llvm/test/DebugInfo
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
..
AArch64 [GlobalISel][DebugInfo] salvageDebugInfo analogue for gMIR 2022-08-01 11:14:53 +02:00
AMDGPU
ARM [IR] Remove support for float binop constant expressions 2022-07-12 09:40:49 +02:00
BPF
COFF [llvm][AArch64] Add missing FPCR, H and B registers to Codeview mapping 2022-07-19 09:33:13 +00:00
CSKY [Object] Support relocation resolver for CSKY 2022-05-13 13:38:17 +08:00
Generic [DebugInfo] Avoid ptrtoint expression in generic test 2022-07-25 11:20:36 +02:00
Inputs [test] Remove zlib-gnu tests 2022-07-14 16:28:57 -07:00
Lanai
MIR [DebugInfo][InstrRef] Describe value sizes when spilt to stack 2022-05-12 15:52:55 +01:00
MSP430 Revert "Round up zero-sized symbols to 1 byte in `.debug_aranges`." 2022-05-31 11:03:44 +02:00
Mips
NVPTX [FileCheck] Catch missspelled directives. 2022-05-26 11:37:19 +01:00
PDB
PowerPC
RISCV
Sparc
Symbolize/ELF [symbolizer] Parse DW_TAG_variable DIs to show line info for globals 2022-05-23 13:30:22 -07:00
SystemZ
WebAssembly [NFC] Rename Instrinsic to Intrinsic 2022-04-25 18:13:23 +01:00
X86 [GlobalISel][DebugInfo] salvageDebugInfo analogue for gMIR 2022-08-01 11:14:53 +02:00
XCOFF [XCOFF] change default program code csect alignment to 32 2022-06-29 04:16:01 +00:00
XCore
arange-overlap.test
arm-relocs.test
attr-btf_tag.ll
attr-btf_type_tag.ll
cDefaultLower.ll
check-debugify-preserves-analyses.ll
cross-cu-inlining.test
cross-cu-scope.ll [NFC][tests] Remove XFAIL for AIX for passing tests 2022-07-20 13:57:11 -04:00
debug-frame-cie-pointer-reloc.test
debugify-bogus-dbg-value.ll
debugify-each.ll [test] Migrate PGO related -instrprof tests to new PM 2022-07-16 01:21:12 -07:00
debugify-export.ll
debugify-ignore-phi.ll
debugify-original-no-dbg-info.ll [Debugify] Port verify-debuginfo-preserve to NewPM 2022-07-06 17:07:20 +02:00
debugify-report-missing-locs-only.ll
debugify.ll
debuglineinfo-macho.test
debuglineinfo-path.ll
debuglineinfo.test
debugmacinfo-dwo.test
debugmacinfo.test
duplicate_dbgvalue.ll
dwarfdump-16bit-addr.test
dwarfdump-accel.test
dwarfdump-bad-lookup-address.test
dwarfdump-dataLocationExp.ll
dwarfdump-dataLocationVar.ll
dwarfdump-debug-frame-simple.test
dwarfdump-decompression-corrupt.test
dwarfdump-decompression-error.test
dwarfdump-dump-flags.test
dwarfdump-dump-gdbindex.test
dwarfdump-dwp.test
dwarfdump-immutable.ll
dwarfdump-implicit-const.test
dwarfdump-macho-relocs.test
dwarfdump-macho-universal.test
dwarfdump-objc.test
dwarfdump-pubnames.test
dwarfdump-pushobjectaddress.ll
dwarfdump-ranges.test
dwarfdump-type-units.test
dwarfdump-zlib.test [test] Remove zlib-gnu tests 2022-07-14 16:28:57 -07:00
dwo.ll
fortran-string-type.ll
fortranDefaultLower.ll
fortranSubrangeCountExpr.ll
fortranSubrangeExpr.ll
fortranSubrangeInt.ll
fortranSubrangeVar.ll
gcc-local-mem-func.test
high-pc-constant.test
implicit-const-test2.s
invalid-inlined-subroutine.s
invalid-relocations.test
limit-arglist-size.ll
llvm-symbolizer-bbsections-test.s
macro_link.ll
member-pointers.o
missing-abstract-variable.o
omit-empty.ll
pr34186.ll
pr34672.ll
pr37964.ll
precomp.test
salvage-cast-debug-info.ll
salvage-duplicate-values.ll
salvage-gep.ll
salvage-limit-expr-size.ll
salvage-nonconst-binop.ll
simplify-cfg-preserve-dbg-values.ll
skeletoncu.ll
strip-DIGlobalVariable.ll
strip-loop-metadata.ll
strip-module-flags.ll
symbolize-64bit-address.test
symbolize-absolute-path-in-debug-line.s
symbolize-build-id-error.test
symbolize-build-id.test
symbolize-demangling.s
symbolize-directory.s
symbolize-filter-markup-color.test [Symbolize] Fix MarkupFilter tests for Windows. 2022-06-27 11:18:41 -07:00
symbolize-filter-markup-context-line-elision.test [Symbolizer] Implement contextual symbolizer markup elements. 2022-07-21 11:29:19 -07:00
symbolize-filter-markup-error-location.test [Symbolizer] Implement contextual symbolizer markup elements. 2022-07-21 11:29:19 -07:00
symbolize-filter-markup-mmap.test [Symbolizer] Implement contextual symbolizer markup elements. 2022-07-21 11:29:19 -07:00
symbolize-filter-markup-module.test [Symbolizer] Implement contextual symbolizer markup elements. 2022-07-21 11:29:19 -07:00
symbolize-filter-markup-parse-fields.test [Symbolizer] Implement contextual symbolizer markup elements. 2022-07-21 11:29:19 -07:00
symbolize-filter-markup-reset.test [Symbolizer] Implement contextual symbolizer markup elements. 2022-07-21 11:29:19 -07:00
symbolize-filter-markup-symbol.test [Symbolize] Add log markup --filter to llvm-symbolizer. 2022-06-27 10:44:15 -07:00
symbolize-filter-markup-tag.test [Symbolize] Add log markup --filter to llvm-symbolizer. 2022-06-27 10:44:15 -07:00
symbolize-gnu-debuglink-fallback.test
symbolize-gnu-debuglink-no-realpath.test
symbolize-gnu-debuglink.test
symbolize-inlined.test
symbolize-macho-universal-unknown-arch.test
symbolize-macho-universal.test
symbolize-missing-file.test
symbolize-no-debug-str.test
symbolize-paths.s
symbolize-shared-abbrev.s
symbolize-split-dwarf-empty.test
symbolize-split-dwarf-no-skel-address.test
symbolize-stripped-sections.test
symbolize-stripped.test
symbolize-tu.test
symbolize-zlib.test [test] Remove zlib-gnu tests 2022-07-14 16:28:57 -07:00
symbolize.test
typeunit-header.test
unrolled-loop-remainder.ll
verify-di-preserve.ll [Debugify] Port verify-debuginfo-preserve to NewPM 2022-07-06 17:07:20 +02:00