1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/lib/Transforms/Scalar
Peter Collingbourne 5dcb77e9fb IR: Introduce local_unnamed_addr attribute.
If a local_unnamed_addr attribute is attached to a global, the address
is known to be insignificant within the module. It is distinct from the
existing unnamed_addr attribute in that it only describes a local property
of the module rather than a global property of the symbol.

This attribute is intended to be used by the code generator and LTO to allow
the linker to decide whether the global needs to be in the symbol table. It is
possible to exclude a global from the symbol table if three things are true:
- This attribute is present on every instance of the global (which means that
  the normal rule that the global must have a unique address can be broken without
  being observable by the program by performing comparisons against the global's
  address)
- The global has linkonce_odr linkage (which means that each linkage unit must have
  its own copy of the global if it requires one, and the copy in each linkage unit
  must be the same)
- It is a constant or a function (which means that the program cannot observe that
  the unique-address rule has been broken by writing to the global)

Although this attribute could in principle be computed from the module
contents, LTO clients (i.e. linkers) will normally need to be able to compute
this property as part of symbol resolution, and it would be inefficient to
materialize every module just to compute it.

See:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160509/356401.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160516/356738.html
for earlier discussion.

Part of the fix for PR27553.

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

llvm-svn: 272709
2016-06-14 21:01:22 +00:00
..
ADCE.cpp [PM] ADCE: Fix caching of analyses. 2016-05-31 17:39:39 +00:00
AlignmentFromAssumptions.cpp Add opt-bisect support to additional passes that can be skipped 2016-05-03 22:32:30 +00:00
BDCE.cpp [PM] BDCE: Fix caching of analyses. 2016-05-31 17:53:22 +00:00
CMakeLists.txt New pass: guard widening 2016-05-18 22:55:34 +00:00
ConstantHoisting.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
ConstantProp.cpp Add opt-bisect support to additional passes that can be skipped 2016-05-03 22:32:30 +00:00
CorrelatedValuePropagation.cpp [PM] Port LVI to the new PM. 2016-06-13 22:01:25 +00:00
DCE.cpp Move helper classes into anonymous namespaces. NFC. 2016-05-15 15:18:11 +00:00
DeadStoreElimination.cpp Add a period. NFC. 2016-06-10 17:59:22 +00:00
EarlyCSE.cpp [PM] Add missing caching of GlobalsAA to EarlyCSE. 2016-06-08 21:31:55 +00:00
FlattenCFGPass.cpp
Float2Int.cpp Avoid copies of std::strings and APInt/APFloats where we only read from it 2016-06-08 10:01:20 +00:00
GuardWidening.cpp Avoid copies of std::strings and APInt/APFloats where we only read from it 2016-06-08 10:01:20 +00:00
GVN.cpp [PM] Preserve the correct set of analyses for GVN. 2016-06-06 20:01:50 +00:00
InductiveRangeCheckElimination.cpp [IRCE] Use C++11 style initializers; NFC 2016-05-26 01:50:18 +00:00
IndVarSimplify.cpp [PM] Port IndVarSimplify to the new pass manager 2016-06-05 18:01:19 +00:00
JumpThreading.cpp Bring back "[PM] Port JumpThreading to the new PM" with a fix 2016-06-14 00:51:09 +00:00
LICM.cpp [LICM] Make isGuaranteedToExecute more accurate. 2016-06-11 21:48:25 +00:00
LLVMBuild.txt
LoadCombine.cpp [PM] LoadCombine preserves GlobalsAA, doesn't depend on it. 2016-06-02 22:05:59 +00:00
LoopDataPrefetch.cpp Remove a few gendered pronouns. 2016-06-10 20:06:03 +00:00
LoopDeletion.cpp Use all_of instead of a raw loop; NFC 2016-05-03 17:50:06 +00:00
LoopDistribute.cpp Revert r272194 No need for it if loop Analysis Manager is used 2016-06-09 03:22:39 +00:00
LoopIdiomRecognize.cpp IR: Introduce local_unnamed_addr attribute. 2016-06-14 21:01:22 +00:00
LoopInstSimplify.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
LoopInterchange.cpp [PM] Port LCSSA to the new PM. 2016-06-09 19:44:46 +00:00
LoopLoadElimination.cpp Revert r272194 No need for it if loop Analysis Manager is used 2016-06-09 03:22:39 +00:00
LoopRerollPass.cpp Enable loopreroll for sext of loop control only IV 2016-05-10 21:16:49 +00:00
LoopRotation.cpp LoopRotate: restructure code to simplify functions 2016-06-14 14:44:05 +00:00
LoopSimplifyCFG.cpp [PM] Port of the DepndenceAnalysis to the new PM. 2016-05-12 22:19:39 +00:00
LoopStrengthReduce.cpp Reapply [LSR] Create fewer redundant instructions. 2016-06-06 19:10:46 +00:00
LoopUnrollPass.cpp The patch set unroll disable pragma when unroll 2016-06-08 20:21:24 +00:00
LoopUnswitch.cpp Disable MSan-hostile loop unswitching. 2016-06-10 20:03:20 +00:00
LoopVersioningLICM.cpp [PM] Port LCSSA to the new PM. 2016-06-09 19:44:46 +00:00
LowerAtomic.cpp [PM] Port LowerAtomic to the new pass manager. 2016-05-13 22:52:35 +00:00
LowerExpectIntrinsic.cpp [LowerExpectIntrinsic] make default likely/unlikely ratio bigger 2016-04-26 22:23:38 +00:00
LowerGuardIntrinsic.cpp [LowerGuards] Rename variable; NFC 2016-05-18 23:16:27 +00:00
MemCpyOptimizer.cpp [PM] Port MemCpyOpt to the new PM. 2016-06-14 02:44:55 +00:00
MergedLoadStoreMotion.cpp [MergedLoadStoreMotion] Before quering AA verify the loads are the same. 2016-06-14 12:47:18 +00:00
NaryReassociate.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
PartiallyInlineLibCalls.cpp [PM] Port PartiallyInlineLibCalls to the new pass manager. 2016-05-25 23:38:53 +00:00
PlaceSafepoints.cpp [PlaceSafepoints] Use DEBUG() instead of TraceLSP 2016-01-28 23:49:27 +00:00
Reassociate.cpp Avoid copies of std::strings and APInt/APFloats where we only read from it 2016-06-08 10:01:20 +00:00
Reg2Mem.cpp Add opt-bisect support to additional passes that can be skipped 2016-05-03 22:32:30 +00:00
RewriteStatepointsForGC.cpp [RewriteStatepointsForGC] All constant should have null base pointer 2016-05-27 13:13:59 +00:00
Scalar.cpp [PM] Port MemCpyOpt to the new PM. 2016-06-14 02:44:55 +00:00
Scalarizer.cpp Add opt-bisect support to additional passes that can be skipped 2016-05-03 22:32:30 +00:00
ScalarReplAggregates.cpp isSafeToLoadUnconditionally support queries without a context 2016-04-27 11:00:48 +00:00
SCCP.cpp [PM] SCCP should preserve GlobalsAA even if the IR is mutated. 2016-05-29 00:31:15 +00:00
SeparateConstOffsetFromGEP.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
SimplifyCFGPass.cpp Move instances of std::function. 2016-06-12 16:13:55 +00:00
Sink.cpp PM: Port SinkingPass to the new pass manager 2016-04-22 19:54:10 +00:00
SpeculativeExecution.cpp Mark that SpeculativeExecution preserves Globals Alias Analysis. 2016-05-03 08:33:26 +00:00
SROA.cpp [PM] Preserve GlobalsAA for SROA. 2016-06-07 13:21:17 +00:00
StraightLineStrengthReduce.cpp SLSR: Use UnknownAddressSpace instead of 0 for pure arithmetic. 2016-04-27 00:32:09 +00:00
StructurizeCFG.cpp [StructurizeCFG] Annotate branches that were treated as uniform 2016-04-14 17:42:35 +00:00
TailRecursionElimination.cpp [TailRecursionElimination] Refactor/cleanup. 2016-06-02 23:02:44 +00:00