diff options
author | Olivier Sallenave <ohsallen@us.ibm.com> | 2015-03-06 23:12:04 +0000 |
---|---|---|
committer | Olivier Sallenave <ohsallen@us.ibm.com> | 2015-03-06 23:12:04 +0000 |
commit | 049d803ce0c0256337da96f13d0082063c03f81d (patch) | |
tree | c4074aa2b2b1404ec2a66535aac1dd3d964ac5b8 /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | |
parent | 66b616351cc034d18c84519d5d1d1db32423639a (diff) | |
download | bcm5719-llvm-049d803ce0c0256337da96f13d0082063c03f81d.tar.gz bcm5719-llvm-049d803ce0c0256337da96f13d0082063c03f81d.zip |
Do not restrict interleaved unrolling to small loops, depending on the target.
llvm-svn: 231528
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 686b8995a31..ffa3fe13df5 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -4564,6 +4564,14 @@ LoopVectorizationCostModel::selectUnrollFactor(bool OptForSize, return SmallUF; } + // Unroll if this is a large loop (small loops are already dealt with by this + // point) that could benefit from interleaved unrolling. + bool HasReductions = (Legal->getReductionVars()->size() > 0); + if (TTI.enableAggressiveInterleaving(HasReductions)) { + DEBUG(dbgs() << "LV: Unrolling to expose ILP.\n"); + return UF; + } + DEBUG(dbgs() << "LV: Not Unrolling.\n"); return 1; } |