llvm-project/llvm/lib/Transforms/IPO
Xin Tong bfdad33b82 [ThinLTO] Keep non-prevailing (linkonce|weak)_odr symbols live
Summary:
If we have a symbol with (linkonce|weak)_odr linkage, we do not want
to dead strip it even it is not prevailing.

IR level (linkonce|weak)_odr symbol can become non-prevailing when we mix
ELF objects and IR objects where the (linkonce|weak)_odr symbol in the ELF
object is prevailing and the ones in the IR objects are not. Stripping
them will prevent us from doing optimizations with them.

By not dead stripping them, We will convert these symbols to
available_externally linkage as a result of non-prevailing and eventually
dropping them after inlining.

I modified cache-prevailing.ll to use linkonce linkage as it is
testing whether cache prevailing bit is effective or not, not
we should treat linkonce_odr alive or not

Reviewers: tejohnson, pcc

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits

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

llvm-svn: 343970
2018-10-08 15:12:48 +00:00
..
AlwaysInliner.cpp Enrich inline messages 2018-08-05 14:53:08 +00:00
ArgumentPromotion.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
BarrierNoopPass.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
BlockExtractor.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
CMakeLists.txt Hot cold splitting pass 2018-09-07 15:03:49 +00:00
CalledValuePropagation.cpp [CVP] Handle instructions with no user. No need to create CVPLattice state. This handles terminator instructions and more. 2018-09-17 15:28:01 +00:00
ConstantMerge.cpp Re-commit "[NFC] More ConstantMerge refactoring" 2018-08-10 22:41:09 +00:00
CrossDSOCFI.cpp Don't call skipModule for CFI lowering passes. 2018-04-12 22:04:11 +00:00
DeadArgumentElimination.cpp [deadargelim] Update dbg.value of 'unused' parameters 2018-09-24 10:01:24 +00:00
ElimAvailExtern.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
ExtractGV.cpp Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
ForceFunctionAttrs.cpp [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative 2018-09-04 12:38:00 +00:00
FunctionAttrs.cpp [FuncAttrs] Remove "access range attributes" for read-none functions 2018-09-11 11:51:29 +00:00
FunctionImport.cpp [ThinLTO] Keep non-prevailing (linkonce|weak)_odr symbols live 2018-10-08 15:12:48 +00:00
GlobalDCE.cpp [GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused [NFC]. 2018-09-20 21:16:16 +00:00
GlobalOpt.cpp [GlobalOpt] Don't apply fastcc if it would break inalloca invariants 2018-08-09 17:29:26 +00:00
GlobalSplit.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
HotColdSplitting.cpp Improve static analysis of cold basic blocks 2018-10-03 06:21:05 +00:00
IPConstantPropagation.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
IPO.cpp Hot cold splitting pass 2018-09-07 15:03:49 +00:00
InferFunctionAttrs.cpp Remove redundant includes from lib/Transforms. 2017-12-13 21:31:01 +00:00
InlineSimple.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Inliner.cpp [Inliner] Attribute callsites with inline remarks 2018-08-28 15:27:25 +00:00
Internalize.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LoopExtractor.cpp Transforms: Introduce Transforms/Utils.h rather than spreading the declarations amongst Scalar.h and IPO.h 2018-03-28 17:44:36 +00:00
LowerTypeTests.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
MergeFunctions.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
PartialInlining.cpp [Partial Inlining] Fix small bug in detecting if we did something 2018-08-03 14:42:53 +00:00
PassManagerBuilder.cpp Temporarily revert "[GVNHoist] Re-enable GVNHoist by default" 2018-10-01 18:57:08 +00:00
PruneEH.cpp [IR] Replace `isa<TerminatorInst>` with `isTerminator()`. 2018-08-26 09:51:22 +00:00
SCCP.cpp Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp instructions. 2018-08-23 11:04:00 +00:00
SampleProfile.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
StripDeadPrototypes.cpp
StripSymbols.cpp Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
SyntheticCountsPropagation.cpp [SyntheticCounts] Rewrite the code using only graph traits. 2018-01-25 22:02:29 +00:00
ThinLTOBitcodeWriter.cpp s/std::set/DenseSet/; NFC 2018-08-27 22:10:59 +00:00
WholeProgramDevirt.cpp [WPD] Fix incorrect devirtualization after indirect call promotion 2018-09-27 14:55:32 +00:00