1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/DebugInfo
Vedant Kumar 3ce517d29d Reland (again): [DWARF] Allow cross-CU references of subprogram definitions
This is a revert-of-revert (i.e. this reverts commit 802bec89, which
itself reverted fa4701e1 and 79daafc9) with a fix folded in. The problem
was that call site tags weren't emitted properly when LTO was enabled
along with split-dwarf. This required a minor fix. I've added a reduced
test case in test/DebugInfo/X86/fission-call-site.ll.

Original commit message:

This allows a call site tag in CU A to reference a callee DIE in CU B
without resorting to creating an incomplete duplicate DIE for the callee
inside of CU A.

We already allow cross-CU references of subprogram declarations, so it
doesn't seem like definitions ought to be special.

This improves entry value evaluation and tail call frame synthesis in
the LTO setting. During LTO, it's common for cross-module inlining to
produce a call in some CU A where the callee resides in a different CU,
and there is no declaration subprogram for the callee anywhere. In this
case llvm would (unnecessarily, I think) emit an empty DW_TAG_subprogram
in order to fill in the call site tag. That empty 'definition' defeats
entry value evaluation etc., because the debugger can't figure out what
it means.

As a follow-up, maybe we could add a DWARF verifier check that a
DW_TAG_subprogram at least has a DW_AT_name attribute.

Update #1:

Reland with a fix to create a declaration DIE when the declaration is
missing from the CU's retainedTypes list. The declaration is left out
of the retainedTypes list in two cases:

1) Re-compiling pre-r266445 bitcode (in which declarations weren't added
   to the retainedTypes list), and
2) Doing LTO function importing (which doesn't update the retainedTypes
   list).

It's possible to handle (1) and (2) by modifying the retainedTypes list
(in AutoUpgrade, or in the LTO importing logic resp.), but I don't see
an advantage to doing it this way, as it would cause more DWARF to be
emitted compared to creating the declaration DIEs lazily.

Update #2:

Fold in a fix for call site tag emission in the split-dwarf + LTO case.

Tested with a stage2 ThinLTO+RelWithDebInfo build of clang, and with a
ReleaseLTO-g build of the test suite.

rdar://46577651, rdar://57855316, rdar://57840415, rdar://58888440

Differential Revision: https://reviews.llvm.org/D70350
2020-01-27 10:52:34 -08:00
..
AArch64 Reland (again): [DWARF] Allow cross-CU references of subprogram definitions 2020-01-27 10:52:34 -08:00
AMDGPU AMDGPU: Fix tests using old number for constant address space 2018-09-10 02:54:25 +00:00
ARM [DebugInfo][test] Change two MIR tests to use -start-before=livedebugvalues instead of -start-after=patchable-function 2020-01-19 00:09:46 -08:00
COFF Revert "[Support] make report_fatal_error abort instead of exit" 2020-01-15 17:52:25 -08:00
Generic Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
Inputs Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
Lanai
Mips [MIPS][ELF] Use PC-relative relocations in .eh_frame when possible 2020-01-13 14:14:03 +00:00
MIR Reland (again): [DWARF] Allow cross-CU references of subprogram definitions 2020-01-27 10:52:34 -08:00
MSP430 MachineOperand/MIParser: Do not print debug-use flag, infer it 2018-10-30 23:28:27 +00:00
NVPTX Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
PDB [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
PowerPC [DWARF] - Emit the correct value for DW_AT_addr_base. 2018-09-20 09:17:36 +00:00
RISCV Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
Sparc Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
SystemZ [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
WebAssembly Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
X86 Reland (again): [DWARF] Allow cross-CU references of subprogram definitions 2020-01-27 10:52:34 -08:00
arange-overlap.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
arm-relocs.test
check-debugify-preserves-analyses.ll
cross-cu-inlining.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
cross-cu-scope.ll Specify REQUIRES: default_triple in two debuginfo tests 2018-11-06 00:16:32 +00:00
debugify-bogus-dbg-value.ll
debugify-each.ll
debugify-export.ll
debugify-report-missing-locs-only.ll
debugify.ll [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
debuglineinfo-macho.test
debuglineinfo-path.ll [llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests 2019-04-27 16:12:14 +00:00
debuglineinfo.test Reapply: DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is empty (devoid of code addresses) 2018-12-21 22:25:01 +00:00
debugmacinfo-dwo.test [DebugInfo] Support for debug_macinfo.dwo section in llvm and llvm-dwarfdump. 2019-12-03 08:54:12 +05:30
debugmacinfo.test
dwarfdump-64-bit-dwarf.test [CommandLine] Don't allow unlimitted dashes for options. Part 1 or 5 2019-04-29 18:34:18 +00:00
dwarfdump-accel.test
dwarfdump-bad-lookup-address.test [DWARF] check whether the DIE is valid before querying for information 2019-04-03 17:13:45 +00:00
dwarfdump-debug-frame-simple.test
dwarfdump-decompression-corrupt.test
dwarfdump-decompression-error.test
dwarfdump-dump-flags.test
dwarfdump-dump-gdbindex.test [llvm-dwarfdump] --gdb-index: fix uninitialized TuListOffset 2019-06-19 13:51:29 +00:00
dwarfdump-dwp.test
dwarfdump-implicit-const.test
dwarfdump-invalid-line-table.test
dwarfdump-invalid.test
dwarfdump-macho-relocs.test
dwarfdump-macho-universal.test
dwarfdump-objc.test
dwarfdump-pubnames.test
dwarfdump-ranges.test Revert "[DWARF] reposting r342048, which was reverted in r342056 due to buildbot errors. Adjusted 2 test cases for ARM and darwin and fixed a bug with the original change in dsymutil." 2018-09-17 15:40:01 +00:00
dwarfdump-type-units.test
dwarfdump-zlib.test
dwo.ll
gcc-local-mem-func.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
high-pc-constant.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
invalid-relocations.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
macro_link.ll
member-pointers.o
missing-abstract-variable.o
omit-empty.ll
pr34186.ll
pr34672.ll
precomp.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
salvage-cast-debug-info.ll Reapply: [DebugInfo] Correctly handle salvaged casts and split fragments at ISel 2019-12-18 16:26:42 +00:00
skeletoncu.ll
strip-DIGlobalVariable.ll
strip-loop-metadata.ll
strip-module-flags.ll
symbolize-64bit-address.test [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-absolute-path-in-debug-line.s [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-build-id.test [llvm-symbolizer] Support debug file lookup using build ID 2019-12-04 15:07:56 -08:00
symbolize-demangling.s [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#2) 2019-01-31 14:17:33 +00:00
symbolize-directory.s Fix more Windows bots after r360015. 2019-05-06 19:12:25 +00:00
symbolize-gnu-debuglink-fallback.test [DebugInfo] Fix /usr/lib/debug llvm-symbolizer lookup with relative paths 2019-02-11 18:05:48 +00:00
symbolize-gnu-debuglink-no-realpath.test [DebugInfo] Fix mkdir use in test 2019-02-01 21:14:21 +00:00
symbolize-gnu-debuglink.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#3) 2019-01-31 14:22:50 +00:00
symbolize-inlined.test [test][tools] Add missing and improve testing 2019-12-09 12:24:23 +00:00
symbolize-macho-universal-unknown-arch.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#2) 2019-01-31 14:17:33 +00:00
symbolize-macho-universal.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#2) 2019-01-31 14:17:33 +00:00
symbolize-missing-file.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#3) 2019-01-31 14:22:50 +00:00
symbolize-no-debug-str.test [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-shared-abbrev.s [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-split-dwarf-empty.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
symbolize-split-dwarf-no-skel-address.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
symbolize-stripped-sections.test [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing 2019-02-06 10:13:14 +00:00
symbolize-stripped.test [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1) 2019-01-31 14:11:17 +00:00
symbolize-tu.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
symbolize-zlib.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
symbolize.test [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer 2019-02-01 10:24:55 +00:00
typeunit-header.test
unrolled-loop-remainder.ll Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00