llvm/lib/Transforms/Scalar
James Molloy bd7c3fb3bf [LSR] Don't try and create post-inc expressions on non-rotated loops
If a loop is not rotated (for example when optimizing for size), the latch is not the backedge. If we promote an expression to post-inc form, we not only increase register pressure and add a COPY for that IV expression but for all IVs!

Motivating testcase:

    void f(float *a, float *b, float *c, int n) {
      while (n-- > 0)
        *c++ = *a++ + *b++;
    }

It's imperative that the pointer increments be located in the latch block and not the header block; if not, we cannot use post-increment loads and stores and we have to keep both the post-inc and pre-inc values around until the end of the latch which bloats register usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278658 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 07:53:03 +00:00
..
ADCE.cpp [ADCE] Refactoring for new functionality (NFC) 2016-08-05 19:38:11 +00:00
AlignmentFromAssumptions.cpp Add some comments linking back to PR28400. 2016-08-08 07:03:49 +00:00
BDCE.cpp
CMakeLists.txt
ConstantHoisting.cpp
ConstantProp.cpp Don't remove side effecting instructions due to ConstantFoldInstruction 2016-07-22 04:54:44 +00:00
CorrelatedValuePropagation.cpp Teach CorrelatedValuePropagation to mark adds as no wrap 2016-08-10 13:08:34 +00:00
DCE.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
DeadStoreElimination.cpp [DSE] Don't remove stores made live by a call which unwinds. 2016-08-12 01:09:53 +00:00
EarlyCSE.cpp [EarlyCSE] Teach about CSE'ing over invariant.start intrinsics 2016-08-09 20:00:47 +00:00
FlattenCFGPass.cpp
Float2Int.cpp
GuardWidening.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
GVN.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
GVNHoist.cpp Test commit 2016-08-13 11:56:50 +00:00
InductiveRangeCheckElimination.cpp [IRCE] Change variable grouping; NFC 2016-08-14 01:04:50 +00:00
IndVarSimplify.cpp [IndVars] Ignore (s|z)exts that don't extend the induction variable 2016-08-13 00:58:31 +00:00
JumpThreading.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
LICM.cpp Fix typos /NFC 2016-08-11 22:34:00 +00:00
LLVMBuild.txt
LoadCombine.cpp [LoadCombine] Simplify code with a brace init. NFC. 2016-08-06 12:11:11 +00:00
LoopDataPrefetch.cpp [PM] Port LoopDataPrefetch to new pass manager 2016-08-13 04:11:27 +00:00
LoopDeletion.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LoopDistribute.cpp [OptDiag,LDist] Convert remaining opt remarks to use the new API 2016-07-21 21:21:34 +00:00
LoopIdiomRecognize.cpp Target independent codesize heuristics for Loop Idiom Recognition 2016-08-11 18:28:33 +00:00
LoopInstSimplify.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LoopInterchange.cpp Use range algorithms instead of unpacking begin/end 2016-08-11 21:15:00 +00:00
LoopLoadElimination.cpp Use the range variant of transform instead of unpacking begin/end 2016-08-12 04:32:42 +00:00
LoopRerollPass.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
LoopRotation.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LoopSimplifyCFG.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LoopStrengthReduce.cpp [LSR] Don't try and create post-inc expressions on non-rotated loops 2016-08-15 07:53:03 +00:00
LoopUnrollPass.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LoopUnswitch.cpp
LoopVersioningLICM.cpp
LowerAtomic.cpp
LowerExpectIntrinsic.cpp
LowerGuardIntrinsic.cpp [PM] Port LowerGuardIntrinsic to the new PM. 2016-07-28 22:08:41 +00:00
MemCpyOptimizer.cpp Use range algorithms instead of unpacking begin/end 2016-08-11 21:15:00 +00:00
MergedLoadStoreMotion.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
NaryReassociate.cpp Add some comments linking back to PR28400. 2016-08-08 07:03:49 +00:00
PartiallyInlineLibCalls.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
PlaceSafepoints.cpp
Reassociate.cpp
Reg2Mem.cpp
RewriteStatepointsForGC.cpp Use the range variant of remove_if instead of unpacking begin/end 2016-08-12 04:32:37 +00:00
Scalar.cpp [PM] Port LoopDataPrefetch to new pass manager 2016-08-13 04:11:27 +00:00
Scalarizer.cpp Scalarizer: Support scalarizing intrinsics 2016-07-25 20:02:54 +00:00
SCCP.cpp Use range algorithms instead of unpacking begin/end 2016-08-11 21:15:00 +00:00
SeparateConstOffsetFromGEP.cpp
SimplifyCFGPass.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
Sink.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
SpeculativeExecution.cpp [PM] Port SpeculativeExecution to the new PM 2016-08-01 21:48:33 +00:00
SROA.cpp Use the range variant of remove_if instead of unpacking begin/end 2016-08-12 04:32:37 +00:00
StraightLineStrengthReduce.cpp
StructurizeCFG.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
TailRecursionElimination.cpp Use the range variant of find/find_if instead of unpacking begin/end 2016-08-12 03:55:06 +00:00