[LoopVectorizer] Limit unroll factor in the presence of nested reductions.
authorJames Molloy <james.molloy@arm.com>
Wed, 20 Aug 2014 23:53:52 +0000 (23:53 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 20 Aug 2014 23:53:52 +0000 (23:53 +0000)
commitbb819edc1f878be5c2f64825373357930293fa5e
tree735970cf16a2568f18ec45a6aed3de7096ca53ee
parent0d1521330705827822808f6f321b9cd371594569
[LoopVectorizer] Limit unroll factor in the presence of nested reductions.

If we have a scalar reduction, we can increase the critical path length if the loop we're unrolling is inside another loop. Limit, by default to 2, so the critical path only gets increased by one reduction operation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216140 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp