1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/Bitcode/Writer
Teresa Johnson e24ec3840e [ThinLTO] Prevent importing of "llvm.used" values
Summary:
This patch prevents importing from (and therefore exporting from) any
module with a "llvm.used" local value. Local values need to be promoted
and renamed when importing, and their presense on the llvm.used variable
indicates that there are opaque uses that won't see the rename. One such
example is a use in inline assembly.

See also the discussion at:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098047.html

As part of this, move collectUsedGlobalVariables out of Transforms/Utils
and into IR/Module so that it can be used more widely. There are several
other places in LLVM that used copies of this code that can be cleaned
up as a follow on NFC patch.

Reviewers: joker.eph

Subscribers: pcc, llvm-commits, joker.eph

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

llvm-svn: 266877
2016-04-20 14:39:45 +00:00
..
BitcodeWriter.cpp [ThinLTO] Prevent importing of "llvm.used" values 2016-04-20 14:39:45 +00:00
BitcodeWriterPass.cpp [ThinLTO] Move summary computation from BitcodeWriter to new pass 2016-04-11 13:58:45 +00:00
BitWriter.cpp
CMakeLists.txt
LLVMBuild.txt [ThinLTO] BitcodeWriter still requires Analysis library 2016-04-11 14:59:07 +00:00
ValueEnumerator.cpp BitcodeWriter: Break recursion when enumerating Metadata, almost NFC 2016-04-19 03:46:51 +00:00
ValueEnumerator.h BitcodeWriter: Break recursion when enumerating Metadata, almost NFC 2016-04-19 03:46:51 +00:00