llvm-6502/lib/Transforms/IPO
Chandler Carruth 1c8db50a9a Port the SSAUpdater-based promotion logic from the old SROA pass to the
new one, and add support for running the new pass in that mode and in
that slot of the pass manager. With this the new pass can completely
replace the old one within the pipeline.

The strategy for enabling or disabling the SSAUpdater logic is to do it
by making the requirement of the domtree analysis optional. By default,
it is required and we get the standard mem2reg approach. This is usually
the desired strategy when run in stand-alone situations. Within the
CGSCC pass manager, we disable requiring of the domtree analysis and
consequentially trigger fallback to the SSAUpdater promotion.

In theory this would allow the pass to re-use a domtree if one happened
to be available even when run in a mode that doesn't require it. In
practice, it lets us have a single pass rather than two which was
simpler for me to wrap my head around.

There is a hidden flag to force the use of the SSAUpdater code path for
the purpose of testing. The primary testing strategy is just to run the
existing tests through that path. One notable difference is that it has
custom code to handle lifetime markers, and one of the tests has been
enhanced to exercise that code.

This has survived a bootstrap and the test suite without serious
correctness issues, however my run of the test suite produced *very*
alarming performance numbers. I don't entirely understand or trust them
though, so more investigation is on-going.

To aid my understanding of the performance impact of the new SROA now
that it runs throughout the optimization pipeline, I'm enabling it by
default in this commit, and will disable it again once the LNT bots have
picked up one iteration with it. I want to get those bots (which are
much more stable) to evaluate the impact of the change before I jump to
any conclusions.

NOTE: Several Clang tests will fail because they run -O3 and check the
result's order of output. They'll go back to passing once I disable it
again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163965 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15 11:43:14 +00:00
..
ArgumentPromotion.cpp Replace some explicit compare loops with std::equal. 2012-07-19 10:46:05 +00:00
CMakeLists.txt llvm/lib: [CMake] Add explicit dependency to intrinsics_gen. 2012-06-24 13:32:01 +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 switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients. 2012-05-28 01:47:44 +00:00
ExtractGV.cpp Remove tabs. 2012-07-19 00:11:40 +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 Implement the isSafeToDiscardIfUnused predicate and use it in globalopt and 2012-06-14 22:48:13 +00:00
GlobalOpt.cpp Make MemoryBuiltins aware of TargetLibraryInfo. 2012-08-29 15:32:21 +00:00
InlineAlways.cpp Fix a pretty scary bug I introduced into the always inliner with 2012-04-01 10:21:05 +00:00
Inliner.cpp Fix an 80 char line limit. 2012-09-13 16:27:32 +00:00
InlineSimple.cpp Remove a bunch of empty, dead, and no-op methods from all of these 2012-03-31 12:48:08 +00:00
Internalize.cpp Add a Fixme. 2012-04-16 04:23:52 +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 Move the CodeExtractor utility to a dedicated header file / source file, 2012-05-04 10:18:49 +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 Remove tabs. 2012-07-19 00:11:40 +00:00
PartialInlining.cpp Move the CodeExtractor utility to a dedicated header file / source file, 2012-05-04 10:18:49 +00:00
PassManagerBuilder.cpp Port the SSAUpdater-based promotion logic from the old SROA pass to the 2012-09-15 11:43:14 +00:00
PruneEH.cpp [unwind removal] We no longer have 'unwind' instructions being generated, so 2012-02-06 21:16:41 +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 Move the "findUsedStructTypes" functionality outside of the Module class. 2012-08-03 00:30:35 +00:00