llvm/test
Teresa Johnson 89c5c63c3c [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266877 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-20 14:39:45 +00:00
..
Analysis Port DemandedBits to the new pass manager. 2016-04-18 23:55:01 +00:00
Assembler [AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic. 2016-04-19 20:51:05 +00:00
Bindings
Bitcode BitcodeWriter: Break recursion when enumerating Metadata, almost NFC 2016-04-19 03:46:51 +00:00
BugPoint [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
CodeGen [RDF] Consider register as live if any alias is live 2016-04-20 14:33:23 +00:00
DebugInfo [LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-19 23:51:52 +00:00
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation [LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-19 23:51:52 +00:00
Integer
JitListener [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LibDriver
Linker ThinLTO: never promote as external weak 2016-04-20 04:18:11 +00:00
LTO
MC [mips][microMIPS] Implement BGEC, BGEUC, BLTC, BLTUC, BEQC and BNEC instructions 2016-04-20 14:07:46 +00:00
Object
Other
SymbolRewriter
TableGen Introduce a "patchable-function" function attribute 2016-04-19 05:24:47 +00:00
ThinLTO/X86 FunctionImport: make sure we always select the right callee in presence of alias 2016-04-20 04:17:36 +00:00
tools Revert "[gold-plugin] Disable name for values other than GlobalValue" 2016-04-20 13:18:47 +00:00
Transforms [ThinLTO] Prevent importing of "llvm.used" values 2016-04-20 14:39:45 +00:00
Unit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:47:41 +00:00
Verifier [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:47:41 +00:00
TestRunner.sh