llvm-mirror/test/Transforms
Teresa Johnson 69b4df22e0 [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible
Summary:
We hit undefined references building with ThinLTO when one source file
contained explicit instantiations of a template method (weak_odr) but
there were also implicit instantiations in another file (linkonce_odr),
and the latter was the prevailing copy. In this case the symbol was
marked hidden when the prevailing linkonce_odr copy was promoted to
weak_odr. It led to unsats when the resulting shared library was linked
with other code that contained a reference (expecting to be resolved due
to the explicit instantiation).

Add a CanAutoHide flag to the GV summary to allow the thin link to
identify when all copies are eligible for auto-hiding (because they were
all originally linkonce_odr global unnamed addr), and only do the
auto-hide in that case.

Most of the changes here are due to plumbing the new flag through the
bitcode and llvm assembly, and resulting test changes. I augmented the
existing auto-hide test to check for this situation.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, eraman, dexonsmith, arphaman, dang, llvm-commits, steven_wu, wmi

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59709

llvm-svn: 360466
2019-05-10 20:08:24 +00:00
..
ADCE Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
AddDiscriminators Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
AggressiveInstCombine Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
AlignmentFromAssumptions Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ArgumentPromotion remove inalloca parameters in globalopt and simplify argpromotion 2019-05-02 00:37:36 +00:00
AtomicExpand Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
BDCE Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
BlockExtractor [BlockExtractor] Change the basic block separator from ',' to ';' 2019-04-29 16:14:00 +00:00
BranchFolding Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
CalledValuePropagation Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
CallSiteSplitting Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
CanonicalizeAliases Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
CodeExtractor Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
CodeGenPrepare [CodeGenPrepare] limit overflow intrinsic matching to a single basic block (2nd try) 2019-05-04 12:46:32 +00:00
ConstantHoisting Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ConstantMerge Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ConstProp Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
Coroutines Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
CorrelatedValuePropagation [CVP] Add tests for urem, sdiv, srem ranges; NFC 2019-05-10 19:36:38 +00:00
CrossDSOCFI Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
DCE Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
DeadArgElim Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
DeadStoreElimination Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
DivRemPairs Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
EarlyCSE Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
EliminateAvailableExternally Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
EntryExitInstrumenter Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ExpandMemCmp/X86 Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
Float2Int Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ForcedFunctionAttrs Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
FunctionAttrs Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
FunctionImport Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
GCOVProfiling Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
GlobalDCE Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
GlobalMerge Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
GlobalOpt [DebugInfo] GlobalOpt DW_OP_deref_size instead of DW_OP_deref. 2019-05-06 07:20:56 +00:00
GlobalSplit Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
GuardWidening [GuardWidening] Wire up a NPM version of the LoopGuardWidening pass 2019-04-18 19:17:14 +00:00
GVN [GVN+LICM] Use line 0 locations for better crash attribution 2019-04-19 22:36:40 +00:00
GVNHoist Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
GVNSink Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
HotColdSplit Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
IndirectBrExpand Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
IndVarSimplify [SCEV] Add explicit representations of umin/smin 2019-05-07 15:28:47 +00:00
InferAddressSpaces [InferAddressSpaces] Enhance the handling of cosntexpr. 2019-05-10 14:57:42 +00:00
InferFunctionAttrs Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
Inline Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
InstCombine Add InstCombine::visitFNeg(...) 2019-05-10 20:01:04 +00:00
InstMerge Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
InstNamer Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
InstSimplify [InstSimplify] add tests for fcmp+minnum; NFC 2019-05-08 17:53:18 +00:00
InterleavedAccess Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
Internalize Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
IPConstantProp Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
IRCE [SCEV] Add explicit representations of umin/smin 2019-05-07 15:28:47 +00:00
JumpThreading Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LCSSA Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LICM Revert "[ValueTracking] Improve isKnowNonZero for Ints" 2019-05-08 14:50:01 +00:00
LoadStoreVectorizer Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopDataPrefetch Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopDeletion Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopDistribute Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopFusion Add basic loop fusion pass. 2019-04-17 18:53:27 +00:00
LoopIdiom Regenerate test case again after last revert 2019-05-07 22:40:40 +00:00
LoopInstSimplify Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopInterchange Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopLoadElim Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopPredication [LoopPred] Fix a blatantly obvious bug in r358684 2019-04-18 17:01:19 +00:00
LoopReroll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopRotate Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopSimplify Delete test cases added in r360162 that should have been deleted in r360190 2019-05-07 22:35:56 +00:00
LoopSimplifyCFG Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopStrengthReduce [SCEV] Add explicit representations of umin/smin 2019-05-07 15:28:47 +00:00
LoopTransformWarning Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopUnroll revert r360162 as it breaks most of the buildbots 2019-05-07 20:57:11 +00:00
LoopUnrollAndJam Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopUnswitch Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopVectorize [LoopVectorizer] fix test file to not run the entire -O3 pipeline 2019-05-09 13:43:22 +00:00
LoopVersioning Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LoopVersioningLICM Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LowerAtomic Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LowerExpectIntrinsic Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LowerGuardIntrinsic Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LowerInvoke Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LowerSwitch Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
LowerTypeTests [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
LowerWidenableCondition Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
MakeGuardsExplicit Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
Mem2Reg Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
MemCpyOpt Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
MergeFunc [MergeFunc] removeUsers: call remove() only on direct users 2019-04-19 07:57:51 +00:00
MergeICmps [MergeICmps][NFC] Re-generate tests with update_test_checks. 2019-05-09 08:37:58 +00:00
MetaRenamer Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
NameAnonGlobals Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
NaryReassociate Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
NewGVN Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ObjCARC [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states 2019-04-25 19:42:55 +00:00
PartiallyInlineLibCalls Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
PGOProfile [PGO][CHR] A bug fix. 2019-05-01 22:49:52 +00:00
PhaseOrdering Pull r360426 as it is breaking the build bots. 2019-05-10 16:03:22 +00:00
PlaceSafepoints Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
PreISelIntrinsicLowering Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
PruneEH Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
Reassociate Fix new reassociate-catchswitch.ll test 2019-05-08 18:39:03 +00:00
Reg2Mem Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
RewriteStatepointsForGC Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SafeStack Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SampleProfile [llvm] Avoid div by 0 when updating profile weights. 2019-05-08 03:57:25 +00:00
ScalarizeMaskedMemIntrin/X86 Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
Scalarizer Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SCCP [SCCP] Fix crash when trying to constant-fold terminators multiple times. 2019-05-08 09:09:54 +00:00
SeparateConstOffsetFromGEP Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SimpleLoopUnswitch [NewPM] Add Option handling for SimpleLoopUnswitch 2019-04-22 10:35:07 +00:00
SimplifyCFG Revert "Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)" 2019-05-06 21:55:05 +00:00
Sink Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SLPVectorizer [SLP] Lit test that cannot get vectorized due to lack of look-ahead operand reordering heuristic. 2019-04-30 11:03:09 +00:00
SpeculateAroundPHIs Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SpeculativeExecution Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SROA Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
StraightLineStrengthReduce Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
StripDeadPrototypes Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
StripSymbols Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
StructurizeCFG Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SyntheticCountsPropagation Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
TailCallElim Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ThinLTOBitcodeWriter [ThinLTO] Fix ThinLTOCodegenerator to export llvm.used symbols 2019-04-17 17:38:09 +00:00
Util Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
WholeProgramDevirt [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00