llvm-6502/test/Transforms
Chandler Carruth 3d69cf57e1 [LPM] Make LCSSA a utility with a FunctionPass that applies it to all
the loops in a function, and teach LICM to work in the presance of
LCSSA.

Previously, LCSSA was a loop pass. That made passes requiring it also be
loop passes and unable to depend on function analysis passes easily. It
also caused outer loops to have a different "canonical" form from inner
loops during analysis. Instead, we go into LCSSA form and preserve it
through the loop pass manager run.

Note that this has the same problem as LoopSimplify that prevents
enabling its verification -- loop passes which run at the end of the loop
pass manager and don't preserve these are valid, but the subsequent loop
pass runs of outer loops that do preserve this pass trigger too much
verification and fail because the inner loop no longer verifies.

The other problem this exposed is that LICM was completely unable to
handle LCSSA form. It didn't preserve it and it actually would give up
on moving instructions in many cases when they were used by an LCSSA phi
node. I've taught LICM to support detecting LCSSA-form PHI nodes and to
hoist and sink around them. This may actually let LICM fire
significantly more because we put everything into LCSSA form to rotate
the loop before running LICM. =/ Now LICM should handle that fine and
preserve it correctly. The down side is that LICM has to require LCSSA
in order to preserve it. This is just a fact of life for LCSSA. It's
entirely possible we should completely remove LCSSA from the optimizer.

The test updates are essentially accomodating LCSSA phi nodes in the
output of LICM, and the fact that we now completely sink every
instruction in ashr-crash below the loop bodies prior to unrolling.

With this change, LCSSA is computed only three times in the pass
pipeline. One of them could be removed (and potentially a SCEV run and
a separate LoopPassManager entirely!) if we had a LoopPass variant of
InstCombine that ran InstCombine on the loop body but refused to combine
away LCSSA PHI nodes. Currently, this also prevents loop unrolling from
being in the same loop pass manager is rotate, LICM, and unswitch.

There is one thing that I *really* don't like -- preserving LCSSA in
LICM is quite expensive. We end up having to re-run LCSSA twice for some
loops after LICM runs because LICM can undo LCSSA both in the current
loop and the parent loop. I don't really see good solutions to this
other than to completely move away from LCSSA and using tools like
SSAUpdater instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200067 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 04:07:24 +00:00
..
ADCE
ArgumentPromotion Note the PR number. 2014-01-23 20:17:12 +00:00
BBVectorize
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp
CorrelatedValuePropagation
DeadArgElim
DeadStoreElimination
DebugIR
EarlyCSE
FunctionAttrs Make nocapture analysis work with addrspacecast 2014-01-14 19:11:52 +00:00
GCOVProfiling
GlobalDCE
GlobalOpt
GVN Fix broken CHECK lines. 2014-01-11 21:06:00 +00:00
IndVarSimplify [LPM] Make LoopSimplify no longer a LoopPass and instead both a utility 2014-01-23 11:23:19 +00:00
Inline Fix known typos 2014-01-24 17:20:08 +00:00
InstCombine InstCombine: Don't try to use aggregate elements of ConstantExprs. 2014-01-24 19:02:37 +00:00
InstSimplify InstSimplify: Make shift, select and GEP simplifications vector-aware. 2014-01-24 17:09:53 +00:00
Internalize
IPConstantProp
JumpThreading
LCSSA
LICM [LPM] Make LCSSA a utility with a FunctionPass that applies it to all 2014-01-25 04:07:24 +00:00
LoopDeletion
LoopIdiom
LoopReroll
LoopRotate
LoopSimplify [LPM] Make LCSSA a utility with a FunctionPass that applies it to all 2014-01-25 04:07:24 +00:00
LoopStrengthReduce Fix broken CHECK lines. 2014-01-11 21:06:00 +00:00
LoopUnroll
LoopUnswitch
LoopVectorize Fix known typos 2014-01-24 17:20:08 +00:00
LowerAtomic
LowerExpectIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg
MemCpyOpt Handle an addrspacecast case in memcpyopt 2014-01-22 21:53:19 +00:00
MergeFunc
MetaRenamer
ObjCARC Fix known typos 2014-01-24 17:20:08 +00:00
PhaseOrdering
PruneEH
Reassociate
Reg2Mem
SampleProfile llvm/test/Transforms/SampleProfile/syntax.ll: Eliminate locale-sensitive message check. 2014-01-11 09:23:52 +00:00
Scalarizer
ScalarRepl
SCCP
SimplifyCFG Switch-to-lookup tables: set threshold to 3 cases 2014-01-15 05:00:27 +00:00
Sink
SLPVectorizer Fix broken CHECK lines. 2014-01-11 21:06:00 +00:00
SROA Fix a really nasty SROA bug with how we handled out-of-bounds memcpy 2014-01-19 12:16:54 +00:00
StripSymbols
StructurizeCFG
TailCallElim
TailDup