llvm-6502/test/Linker
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
..
Inputs Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2002-07-17-GlobalFail.ll
2002-07-17-LinkTest2.ll
2002-08-20-ConstantExpr.ll
2003-01-30-LinkerRename.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2003-01-30-LinkerTypeRename.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2003-04-23-LinkOnceLost.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2003-04-26-NullPtrLinkProblem.ll
2003-05-15-TypeProblem.ll
2003-05-31-LinkerRename.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2003-06-02-TypeResolveProblem2.ll
2003-06-02-TypeResolveProblem.ll
2003-08-20-OpaqueTypeResolve.ll
2003-08-23-GlobalVarLinking.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2003-08-23-RecursiveOpaqueTypeResolve.ll
2003-08-24-InheritPtrSize.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2003-08-28-TypeResolvesGlobal2.ll
2003-08-28-TypeResolvesGlobal3.ll
2003-08-28-TypeResolvesGlobal.ll
2003-10-27-LinkOncePromote.ll
2003-11-18-TypeResolution.ll
2004-02-17-WeakStrongLinkage.ll
2004-05-07-TypeResolution1.ll
2004-05-07-TypeResolution2.ll
2004-12-03-DisagreeingType.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2005-02-12-ConstantGlobals-2.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2005-02-12-ConstantGlobals.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2005-12-06-AppendingZeroLengthArrays.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2006-01-19-ConstantPacked.ll Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
2006-06-15-GlobalVarAlignment.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2008-03-05-AliasReference2.ll
2008-03-05-AliasReference.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
2008-03-07-DroppedSection_a.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2008-03-07-DroppedSection_b.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2008-06-13-LinkOnceRedefinition.ll
2008-06-26-AddressSpace.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
2008-07-06-AliasFnDecl2.ll
2008-07-06-AliasFnDecl.ll
2008-07-06-AliasWeakDest2.ll
2008-07-06-AliasWeakDest.ll
2009-09-03-mdnode2.ll
2009-09-03-mdnode.ll
2011-08-04-DebugLoc2.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2011-08-04-DebugLoc.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2011-08-04-Metadata2.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2011-08-04-Metadata.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2011-08-18-unique-class-type2.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2011-08-18-unique-class-type.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
2011-08-18-unique-debug-type2.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2011-08-18-unique-debug-type.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2011-08-22-ResolveAlias2.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
2011-08-22-ResolveAlias.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
alias.ll Allow alias to point to an arbitrary ConstantExpr. 2014-06-03 02:41:57 +00:00
AppendingLinkage2.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
AppendingLinkage.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
available_externally_a.ll
available_externally_b.ll
basiclink.ll
comdat2.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
comdat3.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
comdat4.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
comdat5.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
comdat6.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
comdat7.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
comdat8.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
comdat9.ll Set comdats when lazily linking functions. 2014-08-15 20:17:08 +00:00
comdat.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
ConstantGlobals1.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
ConstantGlobals2.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
ConstantGlobals3.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
constructor-comdat.ll Fix use of uninitialized variable. 2014-08-11 17:07:34 +00:00
ctors.ll Fix pr20078. 2014-09-05 21:27:52 +00:00
datalayout.ll Don't assume an empty stderr. 2014-03-11 18:25:33 +00:00
DbgDeclare2.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
DbgDeclare.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
debug-info-version-a.ll LTO: Add a testcase for linking modules with incompatible Debug Info 2014-05-19 23:41:25 +00:00
debug-info-version-b.ll LTO: Add a testcase for linking modules with incompatible Debug Info 2014-05-19 23:41:25 +00:00
dllstorage-a.ll Copy dll storage in copyAttributes. 2014-02-13 05:11:35 +00:00
dllstorage-b.ll Copy dll storage in copyAttributes. 2014-02-13 05:11:35 +00:00
func-attrs-a.ll Verify that attributes are not lost during linking. 2014-01-24 19:20:15 +00:00
func-attrs-b.ll Verify that attributes are not lost during linking. 2014-01-24 19:20:15 +00:00
global_ctors.ll Don't upgrade global constructors when reading bitcode 2014-08-12 16:46:37 +00:00
inlineasm.ll
link-global-to-func.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
link-messages.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
link-type-names.ll
linkage2.ll Merge alignment of common GlobalValue. 2014-09-09 17:48:18 +00:00
linkage.ll
linkmdnode2.ll
linkmdnode.ll
linknamedmdnode2.ll
linknamedmdnode.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
LinkOnce.ll
metadata-a.ll
metadata-b.ll
module-flags-1-a.ll [Linker] Change module flag linking to be more extensible. 2013-01-16 18:39:23 +00:00
module-flags-1-b.ll
module-flags-2-a.ll
module-flags-2-b.ll
module-flags-3-a.ll [Linker] Change module flag linking to be more extensible. 2013-01-16 18:39:23 +00:00
module-flags-3-b.ll
module-flags-4-a.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
module-flags-4-b.ll
module-flags-5-a.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
module-flags-5-b.ll
module-flags-6-a.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
module-flags-6-b.ll
module-flags-7-a.ll [Linker] Change module flag linking to be more extensible. 2013-01-16 18:39:23 +00:00
module-flags-7-b.ll [Linker] Change module flag linking to be more extensible. 2013-01-16 18:39:23 +00:00
module-flags-8-a.ll [IR] Add 'Append' and 'AppendUnique' module flag behaviors. 2013-01-16 21:38:56 +00:00
module-flags-8-b.ll [IR] Add 'Append' and 'AppendUnique' module flag behaviors. 2013-01-16 21:38:56 +00:00
multiple-merged-structs.ll
partial-type-refinement-link.ll
partial-type-refinement.ll
PR8300.ll
prefixdata.ll Implement function prefix data as an IR feature. 2013-09-16 01:08:15 +00:00
redefinition.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
targettriple.ll Don't assume an empty stderr. 2014-03-11 18:25:33 +00:00
testlink1.ll Fix a copy/paste error in the IR Linker, casting an ArrayType instead of a VectorType. 2013-01-10 10:49:36 +00:00
testlink2.ll Fix a copy/paste error in the IR Linker, casting an ArrayType instead of a VectorType. 2013-01-10 10:49:36 +00:00
transitive-lazy-link.ll [tests] Use multiple statements instead of 'echo -e', which is not part of BSD echo. 2013-08-29 03:02:30 +00:00
type-unique-inheritance.ll Debug Info: In DIBuilder, the context fields of a TAG_inheritance and a 2013-09-09 23:07:58 +00:00
type-unique-odr-a.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
type-unique-odr-b.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
type-unique-simple2-a.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
type-unique-simple2-b.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
type-unique-simple2.ll Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple' 2014-01-30 01:39:17 +00:00
type-unique-simple-a.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
type-unique-simple-b.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
type-unique-type-array-a.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
type-unique-type-array-b.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
unnamed-addr1-a.ll Allow aliases to be unnamed_addr. 2014-06-06 01:20:28 +00:00
unnamed-addr1-b.ll Make this input file pass the verifier. 2014-09-09 15:40:12 +00:00
unnamed-addr-err-a.ll Error on linking appending globals with different unnamed_addr. 2013-09-04 15:33:34 +00:00
unnamed-addr-err-b.ll Error on linking appending globals with different unnamed_addr. 2013-09-04 15:33:34 +00:00
visibility1.ll
visibility2.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
weakextern.ll Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00