llvm-project/llvm/include/llvm/IR
Teresa Johnson 37b80122bd [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
..
Argument.h [COFF, ARM64] Fix ABI implementation of struct returns 2019-05-03 21:12:36 +00:00
AssemblyAnnotationWriter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Attributes.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Attributes.td IR: Add immarg attribute 2019-03-12 21:02:54 +00:00
AutoUpgrade.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BasicBlock.h [NFC] BasicBlock: generalize replaceSuccessorsPhiUsesWith(), take Old bb 2019-05-05 18:59:45 +00:00
CFG.h Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
CFGDiff.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [IR] Split Intrinsics.inc into enums and implementations 2018-06-23 02:02:38 +00:00
CallSite.h Fix typos: (re)?sor?uce -> (re)?source 2019-04-26 05:56:23 +00:00
CallingConv.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Comdat.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Constant.h [InstCombine] canonicalize funnel shift constant shift amount to be modulo bitwidth 2019-03-14 19:22:08 +00:00
ConstantFolder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConstantRange.h [ConstantRange] Add srem() support 2019-05-06 16:59:37 +00:00
Constants.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DIBuilder.h Fix Wdocumentation warning. NFCI. 2019-04-09 09:38:25 +00:00
DataLayout.h [IR][ARM] Add function pointer alignment to datalayout 2019-03-08 10:44:06 +00:00
DebugInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DebugInfoFlags.def [DebugInfo] Combine Trivial and NonTrivial flags 2019-04-11 20:25:10 +00:00
DebugInfoMetadata.h [DebugInfo] Delete TypedDINodeRef 2019-05-07 02:06:37 +00:00
DebugLoc.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DerivedTypes.h [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
DerivedUser.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DiagnosticHandler.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DiagnosticInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DiagnosticPrinter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Dominators.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Function.h Add optional arg to profile count getters to filter 2019-04-24 19:51:16 +00:00
GVMaterializer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GetElementPtrTypeIterator.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalAlias.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalIFunc.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalIndirectSymbol.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalObject.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalValue.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalVariable.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IRBuilder.h Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
IRPrintingPasses.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InlineAsm.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstIterator.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstVisitor.h Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
InstrTypes.h Refactor UnaryOperator class 2019-05-07 00:10:12 +00:00
Instruction.def Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
Instruction.h [NFC] Instruction: introduce replaceSuccessorWith() function, use it 2019-05-05 18:59:22 +00:00
Instructions.h Refactor UnaryOperator class 2019-05-07 00:10:12 +00:00
IntrinsicInst.h [IR] Add WithOverflowInst class 2019-04-16 18:55:16 +00:00
Intrinsics.h Fix misspelled filenames in file headers 2019-02-07 14:38:25 +00:00
Intrinsics.td Remove immarg from llvm.expect 2019-03-17 23:16:18 +00:00
IntrinsicsAArch64.td [AArch64] Add support for MTE intrinsics 2019-04-23 09:39:58 +00:00
IntrinsicsAMDGPU.td [AMDGPU] gfx1010 MIMG implementation 2019-05-01 16:32:58 +00:00
IntrinsicsARM.td ARM: Add ImmArg to intrinsics 2019-03-14 13:46:14 +00:00
IntrinsicsBPF.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IntrinsicsHexagon.td Hexagon: Add ImmArg to intrinsics 2019-03-13 19:46:33 +00:00
IntrinsicsMips.td Mips: Add ImmArg to intrinsics 2019-03-13 19:07:59 +00:00
IntrinsicsNVVM.td PTX 6.3 extends `wmma` instruction to support s8/u8/s4/u4/b1 -> s32. 2019-04-25 22:27:57 +00:00
IntrinsicsPowerPC.td Add __builtin_dcbf support for PPC 2019-04-29 23:25:33 +00:00
IntrinsicsRISCV.td [RISCV] Add ImmArg to intrinsics 2019-03-18 06:01:27 +00:00
IntrinsicsSystemZ.td SystemZ: Add ImmArg to intrinsics 2019-03-13 19:46:32 +00:00
IntrinsicsWebAssembly.td [WebAssembly] Add immarg attribute to intrinsics 2019-03-19 05:02:30 +00:00
IntrinsicsX86.td Enable AVX512_BF16 instructions, which are supported for BFLOAT16 in Cooper Lake 2019-05-06 08:22:37 +00:00
IntrinsicsXCore.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMContext.h Reland "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer" 2019-03-06 15:20:13 +00:00
LegacyPassManager.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LegacyPassManagers.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LegacyPassNameParser.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MDBuilder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mangler.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Metadata.def Add LLVM IR debug info support for Fortran COMMON blocks 2019-04-08 19:13:55 +00:00
Metadata.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Module.h [PGO] Remove the default parameter in ProfileSummary API. NFC 2019-03-01 18:36:24 +00:00
ModuleSlotTracker.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleSummaryIndex.h [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
ModuleSummaryIndexYAML.h [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
NoFolder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OperandTraits.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Operator.h Reland "Relax constraints for reduction vectorization" 2019-03-12 01:31:44 +00:00
OptBisect.h Fix IR/Analysis layering issue with OptBisect 2019-02-28 04:00:55 +00:00
PassInstrumentation.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassManager.h [AliasAnalysis/NewPassManager] Invalidate AAManager less often. 2019-04-30 22:15:47 +00:00
PassManagerInternal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassTimingInfo.h [Legacy][TimePasses] allow -time-passes reporting into a custom stream 2019-03-22 23:11:08 +00:00
PatternMatch.h Update PatternMatcher for FNeg 2019-05-03 21:19:12 +00:00
PredIteratorCache.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProfileSummary.h [PGO] Context sensitive PGO (part 2) 2019-02-28 19:55:07 +00:00
RemarkStreamer.h [Remarks] Add string deduplication using a string table 2019-04-24 00:06:24 +00:00
RuntimeLibcalls.def Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SafepointIRVerifier.h SafepointIRVerifier port to new Pass Manager 2019-03-31 10:15:39 +00:00
Statepoint.h Fix uninitialized value warnings in StatepointBase constructors. NFCI. 2019-05-09 12:21:00 +00:00
SymbolTableListTraits.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TrackingMDRef.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Type.h [opaque pointer types] Remove GraphTraits specialization for Type. 2019-01-28 13:25:57 +00:00
TypeFinder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Use.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UseListOrder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
User.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Value.def Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Value.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ValueHandle.h Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
ValueMap.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ValueSymbolTable.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Verifier.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00