llvm-6502/lib/Transforms/IPO
Nick Lewycky fad4d40f37 Teach GlobalOpt to handle atomic accesses to globals.
* Most of the transforms come through intact by having each transformed load or
store copy the ordering and synchronization scope of the original.
 * The transform that turns a global only accessed in main() into an alloca
(since main is non-recursive) with a store of the initial value uses an
unordered store, since it's guaranteed to be the first thing to happen in main.
(Threads may have started before main (!) but they can't have the address of a
function local before the point in the entry block we insert our code.)
 * The heap-SRoA transforms are disabled in the face of atomic operations. This
can probably be improved; it seems odd to have atomic accesses to an alloca
that doesn't have its address taken.

AnalyzeGlobal keeps track of the strongest ordering found in any use of the
global. This is more information than we need right now, but it's cheap to
compute and likely to be useful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149847 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05 19:56:38 +00:00
..
ArgumentPromotion.cpp Update inter-procedural optimizations for atomic load/store. 2011-08-15 22:16:46 +00:00
CMakeLists.txt build/CMake: Finish removal of add_llvm_library_dependencies. 2011-11-29 19:25:30 +00:00
ConstantMerge.cpp Re-fix the issue Bill fixed in r147899 in a slightly different way, which doesn't abuse the semantics of linker_private. We don't really want to merge any string constant with a weak_odr global. 2012-01-11 22:06:46 +00:00
DeadArgumentElimination.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
ExtractGV.cpp Improve the handling of available_externally and llvm.global_ctors. 2011-06-09 14:38:09 +00:00
FunctionAttrs.cpp SCCCaptured is trivially false on entry to this loop and not modified inside it. 2012-01-05 22:21:45 +00:00
GlobalDCE.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
GlobalOpt.cpp Teach GlobalOpt to handle atomic accesses to globals. 2012-02-05 19:56:38 +00:00
InlineAlways.cpp Inlining and unrolling heuristics should be aware of free truncs. 2011-10-01 01:39:05 +00:00
Inliner.cpp Refactor code from inlining and globalopt that checks whether a function definition is unused, and enhance it so it can tell that functions which are only used by a blockaddress are in fact dead. This probably doesn't happen much on most code, but the Linux kernel's _THIS_IP_ can trigger this issue with blockaddress. (GlobalDCE can also handle the given tescase, but we only run that at -O3.) Found while looking at PR11180. 2011-10-20 05:23:42 +00:00
InlineSimple.cpp Inlining and unrolling heuristics should be aware of free truncs. 2011-10-01 01:39:05 +00:00
Internalize.cpp These llvm.dbg.* constants are not used anymore. 2011-03-09 19:41:33 +00:00
IPConstantPropagation.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
IPO.cpp C API functions must be able to see their extern "C" definitions, or it will be impossible to call them from C. 2011-08-19 01:36:54 +00:00
LLVMBuild.txt Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
LoopExtractor.cpp Place the check for an exit landing pad where it will be run on both code paths through the if-then-else. 2011-09-20 22:27:16 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
MergeFunctions.cpp Update inter-procedural optimizations for atomic load/store. 2011-08-15 22:16:46 +00:00
PartialInlining.cpp Remove PHINode::reserveOperandSpace(). Instead, add a parameter to 2011-03-30 11:28:46 +00:00
PassManagerBuilder.cpp Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
PruneEH.cpp Mark the SCC as "might unwind" if we run into a 'resume' instruction. 2011-08-15 18:22:00 +00:00
StripDeadPrototypes.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
StripSymbols.cpp switch to use the new api for structtypes. 2011-08-12 18:06:37 +00:00