diff options
author | Michael Kuperstein <mkuper@google.com> | 2017-01-26 01:04:11 +0000 |
---|---|---|
committer | Michael Kuperstein <mkuper@google.com> | 2017-01-26 01:04:11 +0000 |
commit | 5dd55e8405d66842219883a55563ec45cc010da4 (patch) | |
tree | 7ddc915e234eb02c440d117caa7b9294cbbbb95a /llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp | |
parent | d230de27f8aa70dca0194f8d5b0030bd557c0909 (diff) | |
download | bcm5719-llvm-5dd55e8405d66842219883a55563ec45cc010da4.tar.gz bcm5719-llvm-5dd55e8405d66842219883a55563ec45cc010da4.zip |
[LoopUnroll] Properly update loopinfo for runtime unrolling by 2
Even when we don't create a remainder loop (that is, when we unroll by 2), we
may duplicate nested loops into the remainder. This is complicated by the fact
the remainder may itself be either inserted into an outer loop, or at the top
level. In the latter case, we may need to create new top-level loops.
Differential Revision: https://reviews.llvm.org/D29156
llvm-svn: 293124
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp index c2adb7caad6..305122511f5 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -1160,7 +1160,8 @@ PreservedAnalyses LoopUnrollPass::run(Loop &L, LoopAnalysisManager &AM, #endif // Unrolling can do several things to introduce new loops into a loop nest: - // - Partial unrolling clones child loops within the current loop. + // - Partial unrolling clones child loops within the current loop. If it + // uses a remainder, then it can also create any number of sibling loops. // - Full unrolling clones child loops within the current loop but then // removes the current loop making all of the children appear to be new // sibling loops. |