1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
llvm-mirror/test/tools
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
..
dsymutil dsymutil/modules: Reword the warning for static libraries without module caches 2016-05-20 20:36:06 +00:00
gold [ThinLTO/gold] Handle bitcode archives 2016-05-26 01:46:41 +00:00
llvm-config Disable all llvm-config tests for now, will investigate later 2016-02-10 17:29:50 +00:00
llvm-cov [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function. 2016-05-20 09:14:24 +00:00
llvm-cxxdump
llvm-dwp llvm-dwp: More error handling around invalid compressed sections 2016-05-23 17:59:17 +00:00
llvm-lit
llvm-lto [ThinLTO] Use valueid instead of bitcode offsets in combined index file 2016-04-27 13:28:35 +00:00
llvm-mc
llvm-nm Fix some bugs in the posix output of llvm-nm. Which is documented on 2016-03-29 20:18:07 +00:00
llvm-objdump Add the printing the Mach-O (__LLVM,__bundle) xar archive file section "verbosely" 2016-05-23 21:34:12 +00:00
llvm-pdbdump Fix several accidental DOS line endings in source files 2016-01-03 17:22:03 +00:00
llvm-profdata [profile] show more statistics 2016-05-23 16:36:11 +00:00
llvm-readobj [llvm-readobj] - Teach readobj to recognize SHF_COMPRESSED flag. 2016-05-21 10:16:58 +00:00
llvm-size Fix llvm-size to exit with non zero when it can’t open a file. 2016-05-02 21:41:03 +00:00
llvm-split Preserve blockaddress use edges in the module splitter. 2016-03-31 21:55:11 +00:00
llvm-symbolizer [PDB] Fix function names for private symbols in PDBs 2016-04-27 16:10:29 +00:00
lto LTOCodeGenerator: add linkonce(_odr) to "llvm.compiler.used" when present in "MustPreserve" set 2016-05-05 05:14:24 +00:00
sancov [sancov] using normalized filenames for blacklist checks. 2016-04-21 23:38:45 +00:00
sanstats Introduce sanstats tool and llvm::CreateSanitizerStatReport function. 2016-01-16 00:31:11 +00:00