llvm-project/llvm/test/DebugInfo
Bjorn Pettersson 428caf988b Re-apply "[DebugInfo] Check size of variable in ConvertDebugDeclareToDebugValue"
This is r334704 (which was reverted in r334732) with a fix for
types like x86_fp80. We need to use getTypeAllocSizeInBits and
not getTypeStoreSizeInBits to avoid dropping debug info for
such types.

Original commit msg:
> Summary:
> Do not convert a DbgDeclare to DbgValue if the store
> instruction only refer to a fragment of the variable
> described by the DbgDeclare.
>
> Problem was seen when for example having an alloca for an
> array or struct, and there were stores to individual elements.
> In the past we inserted a DbgValue intrinsics for each store,
> just as if the store wrote the whole variable.
>
> When handling store instructions we insert a DbgValue that
> indicates that the variable is "undefined", as we do not know
> which part of the variable that is updated by the store.
>
> When ConvertDebugDeclareToDebugValue is used with a load/phi
> instruction we assert that the referenced value is large enough
> to cover the whole variable. Afaict this should be true for all
> scenarios where those methods are used on trunk. If the assert
> blows in the future I guess we could simply skip to insert a
> dbg.value instruction.
>
> In the future I think we should examine which part of the variable
> that is accessed, and add a DbgValue instrinsic with an appropriate
> DW_OP_LLVM_fragment expression.
>
> Reviewers: dblaikie, aprantl, rnk
>
> Reviewed By: aprantl
>
> Subscribers: JDevlieghere, llvm-commits
>
> Tags: #debug-info
>
> Differential Revision: https://reviews.llvm.org/D48024

llvm-svn: 334830
2018-06-15 13:48:55 +00:00
..
AArch64 [DebugInfo] Fix test failed due to new DISubprogram attributes. 2018-05-09 06:22:39 +00:00
AMDGPU [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
ARM [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
COFF [CodeView] Omit forward references for unnamed structs and unions 2018-06-11 01:39:34 +00:00
Generic [CodeGen/AccelTable]: Handle -dwarf-linkage-names=Abstract correctly 2018-05-14 14:13:20 +00:00
Inputs [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
Lanai
MIR [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
MSP430 [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
Mips [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
NVPTX Revert "Temporarily revert "[DEBUG] Initial adaptation of NVPTX target for debug info emission."" 2018-05-18 03:13:08 +00:00
PDB Update CodeView register names in a test that was missed in r333421. 2018-05-29 19:21:22 +00:00
PowerPC Canonicalize the representation of empty an expression in DIGlobalVariableExpression 2017-08-30 18:06:51 +00:00
Sparc [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
SystemZ [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
WebAssembly [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
X86 Re-apply "[DebugInfo] Check size of variable in ConvertDebugDeclareToDebugValue" 2018-06-15 13:48:55 +00:00
arm-relocs.test llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
check-debugify-preserves-analyses.ll [opt] Introduce -strip-named-metadata 2018-06-05 00:56:08 +00:00
cross-cu-scope.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
debugify-each.ll [Debugify] Add a quiet mode to suppress warnings 2018-06-06 19:05:41 +00:00
debugify.ll [Debugify] Skip dbg.value placement for EH pads, musttail 2018-06-03 22:50:22 +00:00
debuglineinfo-macho.test
debuglineinfo-path.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
debuglineinfo.test
debugmacinfo.test [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
dwarfdump-64-bit-dwarf.test [DebugInfo] Dump a .debug_line section, including line-number program, 2017-11-22 15:48:30 +00:00
dwarfdump-accel.test Refactor dwarfdump -apple-names output 2018-01-29 11:33:17 +00:00
dwarfdump-debug-frame-simple.test [dwarfdump] Make .eh_frame an alias for .debug_frame 2017-09-18 14:15:57 +00:00
dwarfdump-decompression-corrupt.test [Object] Verify object sizes before handing out StringRefs pointing out 2017-08-31 12:27:10 +00:00
dwarfdump-decompression-error.test
dwarfdump-dump-flags.test llvm-dwarfdump: automatically dump both regular and .dwo variant of sections 2017-09-13 22:09:01 +00:00
dwarfdump-dump-gdbindex.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-dwp.test llvm-dwarfdump: automatically dump both regular and .dwo variant of sections 2017-09-13 22:09:01 +00:00
dwarfdump-implicit-const.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-invalid-line-table.test [DebugInfo] Don't crash when given invalid DWARFv5 line table prologue. 2018-01-05 10:03:02 +00:00
dwarfdump-invalid.test
dwarfdump-macho-relocs.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-macho-universal.test [dsymutil] Rename llvm-dsymutil -> dsymutil 2018-03-18 11:38:41 +00:00
dwarfdump-objc.test llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
dwarfdump-pubnames.test llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
dwarfdump-ranges.test [DebugInfo] Unify dumping of address ranges 2018-01-16 11:17:57 +00:00
dwarfdump-type-units.test Re-land "[llvm-dwarfdump] Print type names in DW_AT_type DIEs" 2017-10-10 14:15:25 +00:00
dwarfdump-zlib.test llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
dwo.ll llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
invalid-relocations.test
llvm-symbolizer-split-dwarf-empty.test Remove some unnecessary REQUIRES: shell from a couple of llvm-symbolizer tests 2018-02-09 15:33:39 +00:00
llvm-symbolizer-split-dwarf-no-skel-address.test Pre-emptively fix test case for windows path separators 2018-02-09 15:39:04 +00:00
llvm-symbolizer-zlib.test
llvm-symbolizer.test llvm-symbolizer: Handle function definitions nested within other functions 2018-05-01 18:08:45 +00:00
macro_link.ll
member-pointers.o
missing-abstract-variable.o
omit-empty.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
pr34186.ll Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
pr34672.ll Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
precomp.test [Debuginfo][COFF] Minimal serialization support for precompiled types records 2018-04-09 20:17:56 +00:00
skeletoncu.ll llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
strip-DIGlobalVariable.ll
strip-loop-metadata.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
strip-module-flags.ll [opt] Introduce -strip-named-metadata 2018-06-05 00:56:08 +00:00
typeunit-header.test llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
unrolled-loop-remainder.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00