llvm/test/Linker
Teresa Johnson 99ee897f54 Restore "Move metadata linking after lazy global materialization/linking."
Summary:
This reverts commit r251965.

Restore "Move metadata linking after lazy global materialization/linking."

This restores commit r251926, with fixes for the LTO bootstrapping bot
failure.

The bot failure was caused by references from debug metadata to
otherwise unreferenced globals. Previously, this caused the lazy linking
to link in their defs, which is unnecessary. With this patch, because
lazy linking is complete when we encounter the metadata reference, the
materializer created a declaration. For definitions such as aliases and
comdats, it is illegal to have a declaration. Furthermore, metadata
linking should not change code generation. Therefore, when linking of
global value bodies is complete, the materializer will simply return
nullptr as the new reference for the linked metadata.

This change required fixing a different test to ensure there was a
real reference to a linkonce global that was only being reference from
metadata.

Note that the new changes to the only-needed-named-metadata.ll test
illustrate an issue with llvm-link -only-needed handling of comdat
groups, whereby it may result in an incomplete comdat group. I note this
in the test comments, but the issue is orthogonal to this patch (it can
be reproduced without any metadata at head).

Reviewers: dexonsmith, rafael, tra

Subscribers: tobiasvk, joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D14447

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252320 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06 17:50:53 +00:00
..
Inputs Restore "Move metadata linking after lazy global materialization/linking." 2015-11-06 17:50:53 +00:00
2002-07-17-GlobalFail.ll
2002-07-17-LinkTest2.ll
2002-08-20-ConstantExpr.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2003-01-30-LinkerRename.ll
2003-01-30-LinkerTypeRename.ll
2003-04-23-LinkOnceLost.ll
2003-04-26-NullPtrLinkProblem.ll
2003-05-15-TypeProblem.ll
2003-05-31-LinkerRename.ll
2003-06-02-TypeResolveProblem2.ll
2003-06-02-TypeResolveProblem.ll
2003-08-20-OpaqueTypeResolve.ll
2003-08-23-GlobalVarLinking.ll
2003-08-23-RecursiveOpaqueTypeResolve.ll
2003-08-24-InheritPtrSize.ll
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 [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2004-05-07-TypeResolution2.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2004-12-03-DisagreeingType.ll
2005-02-12-ConstantGlobals-2.ll
2005-02-12-ConstantGlobals.ll
2005-12-06-AppendingZeroLengthArrays.ll
2006-01-19-ConstantPacked.ll
2008-03-05-AliasReference2.ll
2008-03-05-AliasReference.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
2008-03-07-DroppedSection_a.ll
2008-03-07-DroppedSection_b.ll
2008-06-13-LinkOnceRedefinition.ll
2008-06-26-AddressSpace.ll
2008-07-06-AliasFnDecl2.ll
2008-07-06-AliasFnDecl.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
2008-07-06-AliasWeakDest2.ll
2008-07-06-AliasWeakDest.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
2009-09-03-mdnode2.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2009-09-03-mdnode.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2011-08-04-DebugLoc2.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2011-08-04-DebugLoc.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2011-08-04-Metadata2.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2011-08-04-Metadata.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2011-08-18-unique-class-type2.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2011-08-18-unique-class-type.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2011-08-18-unique-debug-type2.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
2011-08-18-unique-debug-type.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
alias.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
alignment.ll
AppendingLinkage2.ll
AppendingLinkage.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
apple-version.ll
available_externally_a.ll
available_externally_b.ll
basiclink.ll
broken.ll tools: Unify how verifyModule() is called 2015-03-31 03:07:23 +00:00
comdat2.ll
comdat4.ll
comdat5.ll
comdat6.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
comdat7.ll
comdat8.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
comdat9.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
comdat10.ll Linker: Do not expect comdat to exist in source module. 2015-06-22 21:46:51 +00:00
comdat.ll
ConstantGlobals.ll
constructor-comdat.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
ctors.ll
datalayout.ll Make DataLayout Non-Optional in the Module 2015-03-04 18:43:29 +00:00
DbgDeclare2.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
DbgDeclare.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
debug-info-version-a.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
debug-info-version-b.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
distinct-cycles.ll
distinct.ll Restore "Move metadata linking after lazy global materialization/linking." 2015-11-06 17:50:53 +00:00
dllstorage-a.ll
dllstorage-b.ll
drop-debug.ll Work around pr23045 and make it easier to reproduce. 2015-03-27 15:55:06 +00:00
func-attrs-a.ll
func-attrs-b.ll
funcimport.ll [ThinLTO] Always set linkage type to external when converting alias 2015-11-04 16:01:16 +00:00
global_ctors.ll
ident.ll
inlineasm.ll
link-flags.ll Fix test check label. 2015-10-29 21:24:38 +00:00
link-global-to-func.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
link-type-names.ll
linkage2.ll
linkage.ll
linkmdnode2.ll
linkmdnode.ll
linknamedmdnode2.ll
linknamedmdnode.ll
LinkOnce.ll
lto-attributes.ll
mdlocation.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
metadata-a.ll
metadata-b.ll
metadata-function.ll Linker: Copy over function metadata attachments 2015-04-24 22:07:31 +00:00
module-flags-1-a.ll
module-flags-1-b.ll
module-flags-2-a.ll
module-flags-2-b.ll
module-flags-3-a.ll
module-flags-3-b.ll llvm-link: Verify input modules 2015-03-25 23:22:10 +00:00
module-flags-4-a.ll
module-flags-4-b.ll llvm-link: Verify input modules 2015-03-25 23:22:10 +00:00
module-flags-5-a.ll
module-flags-5-b.ll
module-flags-6-a.ll
module-flags-6-b.ll
module-flags-7-a.ll
module-flags-7-b.ll
module-flags-8-a.ll
module-flags-8-b.ll
module-flags-dont-change-others.ll
module-flags-pic-1-a.ll
module-flags-pic-2-a.ll
multiple-merged-structs.ll
only-needed-named-metadata.ll Restore "Move metadata linking after lazy global materialization/linking." 2015-11-06 17:50:53 +00:00
opaque.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
override-different-linkage.ll Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
override-with-internal-linkage-2.ll Changed renaming of local symbols by inserting a dot vefore the numeric suffix. 2015-05-12 16:47:30 +00:00
override-with-internal-linkage.ll Linker: Update -override testcase to check callers 2015-04-24 16:56:24 +00:00
override.ll Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
partial-type-refinement-link.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
partial-type-refinement.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
pr21374.ll
pr21494.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
pr22807.ll Remember to move a type to the correct set when setting the body. 2015-03-06 00:50:21 +00:00
PR8300.ll
prologuedata.ll
redefinition.ll
replaced-function-matches-first-subprogram.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
subprogram-linkonce-weak.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
targettriple.ll lit: Add 'cd' support to the internal shell and port some tests 2015-03-02 21:33:18 +00:00
testlink.ll Changed renaming of local symbols by inserting a dot vefore the numeric suffix. 2015-05-12 16:47:30 +00:00
transitive-lazy-link.ll
type-unique-alias.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
type-unique-dst-types.ll
type-unique-inheritance.ll
type-unique-name.ll
type-unique-odr-a.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
type-unique-odr-b.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
type-unique-opaque.ll
type-unique-simple2-a.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
type-unique-simple2-b.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
type-unique-simple2.ll Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
type-unique-simple-a.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
type-unique-simple-b.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
type-unique-src-type.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
type-unique-type-array-a.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
type-unique-type-array-b.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
type-unique-unrelated.ll
unique-fwd-decl-a.ll
unique-fwd-decl-order.ll
uniqued-distinct-cycles.ll Linker: Fix references to uniqued nodes after r243883 2015-08-04 06:42:31 +00:00
unnamed-addr1-a.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
unnamed-addr1-b.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
unnamed-addr-err-a.ll
unnamed-addr-err-b.ll
visibility.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
weakextern.ll