llvm-mirror/lib
Mehdi Amini 3173b24456 ThinLTO: special handling for LinkOnce functions
These function can be dropped by the compiler if they are no longer
referenced in the current module. However there is a change that
another module is still referencing them because of the import.

Multiple solutions can be used:

- Always import LinkOnce when a caller is imported. This ensure that
  every module with a call to a LinkOnce has the definition and will
  be able to emit it if it emits the call.
- Turn the LinkOnce into Weak, so that it is always emitted.
- Turn all LinkOnce into available_externally and come back after all
  modules are codegen'ed to emit only one copy of the linkonce, when
  there is still a reference to it.

This patch implement the second option, with am optimization that
only *one* module will turn the LinkOnce into Weak, while the others
will turn it into available_externally, so that there is exactly one
copy emitted for the whole compilation.

http://reviews.llvm.org/D18346

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265190
2016-04-01 21:53:50 +00:00
..
Analysis [NVPTX] Infer __nvvm_reflect as nounwind, readnone 2016-03-31 21:29:57 +00:00
AsmParser Swift Calling Convention: add swifterror attribute. 2016-04-01 21:41:15 +00:00
Bitcode Swift Calling Convention: add swifterror attribute. 2016-04-01 21:41:15 +00:00
CodeGen Swift Calling Convention: add swifterror attribute. 2016-04-01 21:41:15 +00:00
DebugInfo Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes. 2016-03-28 17:40:08 +00:00
ExecutionEngine More more change need as part of r264187 where ErrorOr<> was added 2016-03-23 21:20:16 +00:00
Fuzzer [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
IR Swift Calling Convention: add swifterror attribute. 2016-04-01 21:41:15 +00:00
IRReader Remove autoconf support 2016-01-26 21:29:08 +00:00
LibDriver Remove autoconf support 2016-01-26 21:29:08 +00:00
LineEditor Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes. 2016-03-28 17:40:08 +00:00
Linker [ThinLTO] Remove post-pass metadata linking support 2016-03-29 18:24:19 +00:00
LTO ThinLTO: special handling for LinkOnce functions 2016-04-01 21:53:50 +00:00
MC Handle section vs global name conflict. 2016-03-28 20:36:28 +00:00
Object Object: Correctly read thin archives containing absolute paths. 2016-03-31 22:08:31 +00:00
ObjectYAML [lanai] Add Lanai backend. 2016-03-28 13:09:54 +00:00
Option Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
Passes [PM] Rename the CRTP mixin base classes for the new pass manager to 2016-03-11 10:33:22 +00:00
ProfileData Fix buildbot lldb-amd64-ninja-netbsd7 failure 2016-04-01 20:15:04 +00:00
Support Fix S390 big endian detection 2016-04-01 05:12:24 +00:00
TableGen [TableGen] Fix typos in comments. NFC 2016-02-26 06:50:27 +00:00
Target Remove useless check for ThreadModel==Single in ARMISelLowering. NFC. 2016-04-01 19:33:19 +00:00
Transforms LowerBitSets: Move declarations to separate namespace. 2016-04-01 18:46:50 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
LLVMBuild.txt Add LLVMBuild for ObjectYAML. 2016-03-01 21:29:33 +00:00