llvm-6502/test
Rafael Espindola 3fd7e37b34 Rewrite the gold plugin to fix pr19901.
There is a fundamental difference between how the gold API and lib/LTO view
the LTO process.

The gold API talks about a particular symbol in a particular file. The lib/LTO
API talks about a symbol in the merged module.

The merged module is then defined in terms of the IR semantics. In particular,
a linkonce_odr GV is only copied if it is used, since it is valid to drop
unused linkonce_odr GVs.

In the testcase in pr19901 both properties collide. What happens is that gold
asks us to keep a particular linkonce_odr symbol, but the IR linker doesn't
copy it to the merged module and we never have a chance to ask lib/LTO to keep
it.

This patch fixes it by having a more direct implementation of the gold API. If
it asks us to keep a symbol, we change the linkage so it is not linkonce. If it
says we can drop a symbol, we do so. All of this before we even send the module
to lib/Linker.

Since now we don't have to produce LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN,
during symbol resolution we can use a temporary LLVMContext and do lazy
module loading. This allows us to keep the minimum possible amount of
allocated memory around. This should also allow as much parallelism as
we want, since there is no shared context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216215 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 20:28:55 +00:00
..
Analysis
Assembler IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
Bindings [OCaml] Add Llvm.{string_of_const,const_element}. 2014-08-03 23:54:22 +00:00
Bitcode verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
BugPoint
CodeGen [AArch64] Run a peephole pass right after AdvSIMD pass. 2014-08-21 18:10:07 +00:00
DebugInfo Reapply [FastISel][X86] Use XOR to materialize the "0" value (r215594). 2014-08-19 19:44:10 +00:00
ExecutionEngine [MCJIT] Add an i386 RuntimeDyldMachO test case. 2014-08-19 21:26:36 +00:00
Feature
FileCheck FileCheck: Add a flag to allow checking empty input 2014-08-07 18:40:37 +00:00
Instrumentation [dfsan] Treat vararg custom functions like unimplemented functions. 2014-08-20 01:40:23 +00:00
Integer
JitListener
Linker Set comdats when lazily linking functions. 2014-08-15 20:17:08 +00:00
LTO
MC [mips] Add assembler support for .set arch=x directive. 2014-08-19 14:22:52 +00:00
Object llvm-objdump: don't print relocations in non-relocatable files. 2014-08-17 19:09:37 +00:00
Other Don't internalize all but main by default. 2014-08-05 20:10:38 +00:00
TableGen llvm/test/TableGen/*Foreach*.td: Remove XFAIL:vg_leak. They have not been failing since r215176. 2014-08-12 14:06:21 +00:00
tools Rewrite the gold plugin to fix pr19901. 2014-08-21 20:28:55 +00:00
Transforms Reassociate x + -0.1234 * y into x - 0.1234 * y 2014-08-21 10:45:30 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg Temporarily Revert "Nuke the old JIT." as it's not quite ready to 2014-08-07 22:02:54 +00:00
lit.site.cfg.in Add missing Interpreter intrinsic lowering for sin, cos and ceil 2014-08-08 15:00:12 +00:00
Makefile Delete support for AuroraUX. 2014-08-14 15:15:09 +00:00
Makefile.tests
TestRunner.sh