llvm/test/Transforms
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
..
ADCE [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
AddDiscriminators [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
AlignmentFromAssumptions
ArgumentPromotion [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
AtomicExpand ARM: use a pseudo-instruction for cmpxchg at -O0. 2016-04-18 21:48:55 +00:00
BBVectorize
BDCE
BranchFolding
CodeExtractor
CodeGenPrepare [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
ConstantHoisting ARM: don't try to hoist constant RHS out of a division. 2016-04-15 18:17:18 +00:00
ConstantMerge
ConstProp
CorrelatedValuePropagation
CrossDSOCFI
DeadArgElim [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
DeadStoreElimination [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
EarlyCSE
EliminateAvailableExternally
Float2Int
ForcedFunctionAttrs
FunctionAttrs Don't IPO over functions that can be de-refined 2016-04-08 00:48:30 +00:00
FunctionImport [ThinLTO] Prevent importing of "llvm.used" values 2016-04-20 14:39:45 +00:00
GCOVProfiling [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
GlobalDCE
GlobalOpt [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
GVN [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
IndVarSimplify [LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-19 23:51:52 +00:00
InferFunctionAttrs
Inline Revert "Replace the use of MaxFunctionCount module flag" 2016-04-18 15:31:11 +00:00
InstCombine [InstCombine][X86] Added extra tests introduced for D17490 2016-04-19 12:59:52 +00:00
InstMerge
InstSimplify [ValueTracking] Correct lit test comments. NFC. 2016-04-18 19:11:45 +00:00
Internalize
IPConstantProp Don't IPO over functions that can be de-refined 2016-04-08 00:48:30 +00:00
IRCE
JumpThreading [ValueTracking] Improve isImpliedCondition for conditions with matching operands. 2016-04-19 17:19:14 +00:00
LCSSA
LICM [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LoadCombine
LoopDataPrefetch
LoopDeletion
LoopDistribute
LoopIdiom [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LoopInterchange
LoopLoadElim
LoopReroll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LoopRotate [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LoopSimplify [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LoopSimplifyCFG
LoopStrengthReduce Don't delete empty preheaders in CodeGenPrepare if it would create a critical edge 2016-04-05 14:06:20 +00:00
LoopUnroll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LoopUnswitch
LoopVectorize [ARM] AArch32 v8 NEON is still not IEEE-754 compliant 2016-04-18 12:06:47 +00:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerBitSets [cfi] Support explicit sections for functions in cfi-icall. 2016-04-15 22:55:38 +00:00
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
MemCpyOpt
MergeFunc MergeFunctions: test alloca better 2016-04-12 00:03:26 +00:00
MetaRenamer
NameAnonFunctions Add a pass to name anonymous/nameless function 2016-04-12 21:35:28 +00:00
NaryReassociate
ObjCARC [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
PartiallyInlineLibCalls
PGOProfile [PGO] Avoid instrumenting direct callee's at value sites. 2016-04-04 18:56:36 +00:00
PhaseOrdering
PlaceSafepoints
PruneEH
Reassociate
Reg2Mem
RewriteStatepointsForGC [RS4GC] Better codegen for deoptimize calls 2016-04-05 23:18:35 +00:00
SafeStack [AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic. 2016-04-19 20:51:05 +00:00
SampleProfile [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
Scalarizer [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
ScalarRepl [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
SCCP Don't IPO over functions that can be de-refined 2016-04-08 00:48:30 +00:00
SeparateConstOffsetFromGEP
SimplifyCFG [LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-19 23:51:52 +00:00
Sink
SLPVectorizer [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
SpeculativeExecution Move divergent-target test into CodeGen/NVPTX because it requires an NVPTX target. 2016-04-15 01:20:52 +00:00
SROA [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
StructurizeCFG AMDGPU: Remove leftover ShaderType attributes in tests 2016-04-13 00:39:48 +00:00
TailCallElim
Util [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
WholeProgramDevirt