1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
llvm-mirror/test/tools/gold/X86
Teresa Johnson be0a5b6b13 [ThinLTO/gold] Handle bitcode archives
Summary:
Several changes were required for ThinLTO links involving bitcode
archive static libraries. With this patch clang/llvm bootstraps with
ThinLTO and gold.

The first is that the gold callbacks get_input_file and
release_input_file can normally be used to get file information for
each constituent bitcode file within an archive. However, these
interfaces lock the underlying file and can't be for each archive
constituent for ThinLTO backends where we get all the input files up
front and don't release any until after the backend threads complete.
However, it is sufficient to only get and release once per file, and
then each consituent bitcode file can be accessed via get_view. This
required saving some information to identify which file handle is the
"leader" for each claimed file sharing the same file descriptor, and
other information so that get_input_file isn't necessary later when
processing the backends.

Second, the module paths in the index need to distinguish between
different constituent bitcode files within the same archive file,
otherwise they will all end up with the same archive file path.
Do this by appending the offset within the archive for the start of the
bitcode file, returned by get_input_file when we claim each bitcode file,
and saving that along with the file handle.

Third, rather than have the function importer try to load a file based
on the module path identifier (which now contains a suffix to
distinguish different bitcode files within an archive), use a custom
module loader. This is the same approach taken in libLTO, and I am using
the support refactored into the new LTO.h header in r270509. The module
loader parses the bitcode files out of the memory buffers returned from
gold via the get_view callback and saved in a map. This also means that
we call the function importer directly, rather than add it to the pass
pipeline (which was in the plan to do already for other reasons).

Reviewers: pcc, joker.eph

Subscribers: llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D20559

llvm-svn: 270814
2016-05-26 01:46:41 +00:00
..
Inputs [ThinLTO/gold] Handle bitcode archives 2016-05-26 01:46:41 +00:00
alias2.ll
alias.ll
available-externally.ll
bad-alias.ll
bcsection.ll
coff.ll
comdat2.ll
comdat.ll [gold] Gate value name discarding under save-temps 2016-04-23 05:15:59 +00:00
common.ll [gold] Fix linkInModule and extend common.ll test. 2016-04-25 18:23:29 +00:00
ctors2.ll
ctors.ll
disable-verify.ll
drop-debug.ll
drop-linkage.ll Fix Gold test after r266750 (ModuleLinker: Do not import linkonce/weak as "external_weak") 2016-04-19 16:21:37 +00:00
emit-llvm.ll
invalid.ll
linker-script.ll
linkonce-weak.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
lit.local.cfg
no-map-whole-file.ll
opt-level.ll
parallel.ll [gold] Save bitcode for module partitions (save-temps + split codegen). 2016-04-06 18:32:13 +00:00
pr19901_thinlto.ll Move summary creation out of llvm-as into opt 2016-04-12 21:35:18 +00:00
pr19901.ll Fix gold tests for llvm-readobj format change. 2016-03-24 16:45:41 +00:00
pr25907.ll
pr25915.ll testcase gardening: update the emissionKind enum to the new syntax. (NFC) 2016-04-01 00:16:49 +00:00
remarks.ll
resolve-to-alias.ll
slp-vectorize.ll
start-lib-common.ll [gold] Fix common symbols handling. 2016-03-11 00:51:57 +00:00
stats.ll
strip_names.ll [gold] Gate value name discarding under save-temps 2016-04-23 05:15:59 +00:00
thinlto_archive.ll [ThinLTO/gold] Handle bitcode archives 2016-05-26 01:46:41 +00:00
thinlto_emit_imports.ll [ThinLTO] Add option to emit imports files for distributed backends 2016-05-10 15:54:09 +00:00
thinlto_linkonceresolution.ll Fix Gold test after r266750 (ModuleLinker: Do not import linkonce/weak as "external_weak") 2016-04-19 16:21:37 +00:00
thinlto_prefix_replace.ll [ThinLTO] Use semicolon to separate path prefix replacement 2016-05-17 18:43:22 +00:00
thinlto.ll Restore "[ThinLTO] Emit individual index files for distributed backends" 2016-05-10 13:48:23 +00:00
type-merge2.ll [gold] Gate value name discarding under save-temps 2016-04-23 05:15:59 +00:00
type-merge.ll
unnamed-addr.ll
vectorize.ll
visibility.ll Remove size 1 from check as that isn't part of what the test is meant to be testing. 2016-04-27 15:03:09 +00:00
weak.ll