Enable SCEV-based unrolling by default.
authorAndrew Trick <atrick@apple.com>
Fri, 2 Sep 2011 17:26:28 +0000 (17:26 +0000)
committerAndrew Trick <atrick@apple.com>
Fri, 2 Sep 2011 17:26:28 +0000 (17:26 +0000)
commit12d1ebe9435437a04577ea550eb679ae54698554
tree1d5589daafd631d4fe609b7766762fbb2d8b2162
parentaca878c5e6d8ed34e436f4a4ec3b4e4dff3616db
Enable SCEV-based unrolling by default.

This changes loop unrolling to use the same mechanism for trip count
computation as indvars. This is a stronger check that tends to unroll
more loops. A very common side-effect is that many single iteration
loops will be removed sooner. The real goal was simply to remove
dependence on canonical IVs.

x86 is break even.
ARM performance changes to expect (+ is good):
External/SPEC/CFP2000/183.equake/183.equake +13%
SingleSource/Benchmarks/Dhrystone/fldry     +21%
MultiSource/Applications/spiff/spiff         +3%
SingleSource/Benchmarks/Stanford/Puzzle     -14%

The Puzzle regression is actually an improvement in loop optimization
that defeats GVN: rdar://problem/10065079.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139009 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnrollPass.cpp