aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-06-17 21:49:29 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-06-19 09:25:57 +0200
commit1bd4085e0bbc14ec61ab69c83464098622b2df56 (patch)
tree4008b11aaaa2c4253d14b0cf95746aea678078dd /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parentd934b72809cb3cbc9f646a2b505e781e0b8b3d7b (diff)
downloadllvm-1bd4085e0bbc14ec61ab69c83464098622b2df56.zip
llvm-1bd4085e0bbc14ec61ab69c83464098622b2df56.tar.gz
llvm-1bd4085e0bbc14ec61ab69c83464098622b2df56.tar.bz2
[LoopUnroll] Push runtime unrolling decision up into tryToUnrollLoop()
Currently, UnrollLoop() is passed an AllowRuntime flag and decides itself whether runtime unrolling should be used or not. This patch pushes the decision into the caller and allows us to eliminate the ULO.TripCount and ULO.TripMultiple parameters. Differential Revision: https://reviews.llvm.org/D104487
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index 5281057..6749d3db 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -984,9 +984,8 @@ bool llvm::UnrollRuntimeLoopRemainder(
LLVM_DEBUG(dbgs() << "Unrolling remainder loop\n");
UnrollResult =
UnrollLoop(remainderLoop,
- {/*Count*/ Count - 1, /*TripCount*/ Count - 1,
- /*Force*/ false, /*AllowRuntime*/ false,
- /*AllowExpensiveTripCount*/ false, /*TripMultiple*/ 1,
+ {/*Count*/ Count - 1, /*Force*/ false, /*Runtime*/ false,
+ /*AllowExpensiveTripCount*/ false,
/*UnrollRemainder*/ false, ForgetAllSCEV},
LI, SE, DT, AC, TTI, /*ORE*/ nullptr, PreserveLCSSA);
}