llvm-6502/test/DebugInfo
Adrian Prantl 02474a32eb Move the complex address expression out of DIVariable and into an extra
argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.

Previously, DIVariable was a variable-length field that has an optional
reference to a Metadata array consisting of a variable number of
complex address expressions. In the case of OpPiece expressions this is
wasting a lot of storage in IR, because when an aggregate type is, e.g.,
SROA'd into all of its n individual members, the IR will contain n copies
of the DIVariable, all alike, only differing in the complex address
reference at the end.

By making the complex address into an extra argument of the
dbg.value/dbg.declare intrinsics, all of the pieces can reference the
same variable and the complex address expressions can be uniqued across
the CU, too.
Down the road, this will allow us to move other flags, such as
"indirection" out of the DIVariable, too.

The new intrinsics look like this:
declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr)
declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr)

This patch adds a new LLVM-local tag to DIExpressions, so we can detect
and pretty-print DIExpression metadata nodes.

What this patch doesn't do:

This patch does not touch the "Indirect" field in DIVariable; but moving
that into the expression would be a natural next step.

http://reviews.llvm.org/D4919
rdar://problem/17994491

Thanks to dblaikie and dexonsmith for reviewing this patch!

Note: I accidentally committed a bogus older version of this patch previously.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218787 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01 18:55:02 +00:00
..
AArch64 Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
ARM Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
COFF Fix a small typo in the test comment 2014-09-23 14:07:12 +00:00
Inputs Omit DW_AT_inline under -gmlt to save a little more space. 2014-09-30 23:29:16 +00:00
Mips Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
PowerPC Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
Sparc Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
SystemZ Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
X86 Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2009-10-16-Phi.ll
2009-11-03-InsertExtractValue.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2009-11-05-DeadGlobalVariable.ll Fix typos 2014-06-19 19:41:26 +00:00
2009-11-06-NamelessGlobalVariable.ll DebugInfo: Assert that a CU's subprogram list contains only subprograms. 2014-05-14 21:52:37 +00:00
2009-11-10-CurrentFn.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-01-05-DbgScope.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2010-03-12-llc-crash.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-03-19-DbgDeclare.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-03-24-MemberFn.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-03-30-InvalidDbgInfoCrash.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-04-06-NestedFnDbgInfo.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-04-19-FramePtr.ll Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple' 2014-01-30 01:39:17 +00:00
2010-05-03-DisableFramePtr.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-05-03-OriginDIE.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-05-10-MultipleCU.ll Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple' 2014-01-30 01:39:17 +00:00
2010-06-29-InlinedFnLocalVar.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2010-07-19-Crash.ll DebugInfo: Assume the CU's Subprogram list only contains definitions. 2014-05-16 18:26:53 +00:00
2010-10-01-crash.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
arm-relocs.test Add support for the R_ARM_ABS32 relocation. 2014-04-03 02:27:00 +00:00
array.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
bug_null_debuginfo.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
constant-pointers.ll PR19767: DebugInfo emission of pointer constants. 2014-05-20 18:21:51 +00:00
cross-cu-inlining.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
cross-cu-linkonce-distinct.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
cross-cu-linkonce.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
cu-range-hole.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
cu-ranges.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
dead-argument-order.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
debug-info-qualifiers.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
debuginfofinder-multiple-cu.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
debuglineinfo.test Add DIContext::getLineInfoForAddressRange() function and test. This function allows a caller to obtain a table of line information for a function using the function's address and size. 2013-01-26 00:28:05 +00:00
dwarf-public-names.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
dwarfdump-debug-frame-simple.test Previously, parsing capability of the .debug_frame section was added 2013-02-21 22:53:19 +00:00
dwarfdump-debug-loc-simple.test Spell correct (s/begining/beginning/) 2013-06-19 21:42:05 +00:00
dwarfdump-dump-flags.test Add command-line flags for DWARF dumping. 2013-01-25 20:26:43 +00:00
dwarfdump-line-dwo.test llvm-dwarfdump: Support for debug_line.dwo section for file names for type units under fission. 2014-02-24 23:58:54 +00:00
dwarfdump-pubnames.test DebugInfo: Make pubnames header printing similar to unit header printing 2013-11-01 17:53:30 +00:00
dwarfdump-ranges.test Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
dwarfdump-type-units.test llvm-dwarfdump: support for emitting only the debug_types section using -debug-dump 2013-11-19 00:29:42 +00:00
dwarfdump-zlib.test Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
empty.ll DebugInfo: Add fission-related sections to COFF 2014-03-26 03:05:10 +00:00
enum-types.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
enum.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
global.ll Move test so that it is skipped if the ARM target is not enabled. 2014-06-20 15:30:38 +00:00
gmlt.test test: XFAIL the non-darwin gmlt test on darwin 2014-10-01 05:45:45 +00:00
incorrect-variable-debugloc.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
inheritance.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
inline-debug-info-multiret.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
inline-debug-info.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
inline-no-debug-info.ll Improve the test for inlining of __no_debug__ functions. 2014-06-11 08:46:45 +00:00
inline-scopes.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
inlined-arguments.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
inlined-vars.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
llvm-symbolizer-zlib.test Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
llvm-symbolizer.test Allow DWARFDebugInfoEntryMinimal::getSubroutineName to resolve cross-unit references. 2014-09-22 12:35:53 +00:00
lto-comp-dir.ll Add comments from Eric's review of r204094. 2014-03-20 17:05:45 +00:00
member-order.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
member-pointers.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
missing-abstract-variable.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
namespace_function_definition.ll DebugInfo: Lazily attach definition attributes to definitions. 2014-05-27 18:37:43 +00:00
namespace_inline_function_definition.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
namespace.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
nodebug.ll Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information. 2014-07-25 16:10:16 +00:00
PR20038.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
restrict.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
sugared-constants.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
template-recursive-void.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
tu-composite.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
tu-member-pointer.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
two-cus-from-same-file.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
typedef.ll DebugInfo: Correct the attribute type kind. 2014-05-01 18:31:21 +00:00
unconditional-branch.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
varargs.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
version.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00