summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopDeletion.cpp9
-rw-r--r--llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp6
2 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
index 4971ab88ab4..bc00ff3f3a4 100644
--- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -36,7 +36,7 @@ namespace {
}
// Possibly eliminate loop L if it is dead.
- bool runOnLoop(Loop *L, LPPassManager &LPM) override;
+ bool runOnLoop(Loop *L, LPPassManager &) override;
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<DominatorTreeWrapperPass>();
@@ -132,7 +132,7 @@ bool LoopDeletion::isLoopDead(Loop *L,
/// so could change the halting/non-halting nature of a program.
/// NOTE: This entire process relies pretty heavily on LoopSimplify and LCSSA
/// in order to make various safety checks work.
-bool LoopDeletion::runOnLoop(Loop *L, LPPassManager &LPM) {
+bool LoopDeletion::runOnLoop(Loop *L, LPPassManager &) {
if (skipOptnoneFunction(L))
return false;
@@ -244,9 +244,8 @@ bool LoopDeletion::runOnLoop(Loop *L, LPPassManager &LPM) {
for (BasicBlock *BB : blocks)
loopInfo.removeBlock(BB);
- // The last step is to inform the loop pass manager that we've
- // eliminated this loop.
- LPM.deleteLoopFromQueue(L);
+ // The last step is to update LoopInfo now that we've eliminated this loop.
+ loopInfo.updateUnloop(L);
Changed = true;
++NumDeleted;
diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
index 849854f11f7..56ae5c01041 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
@@ -131,7 +131,7 @@ namespace {
bool UserAllowPartial;
bool UserRuntime;
- bool runOnLoop(Loop *L, LPPassManager &LPM) override;
+ bool runOnLoop(Loop *L, LPPassManager &) override;
/// This transformation requires natural loop information & requires that
/// loop preheaders be inserted into the CFG...
@@ -886,7 +886,7 @@ unsigned LoopUnroll::selectUnrollCount(
return Count;
}
-bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) {
+bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &) {
if (skipOptnoneFunction(L))
return false;
@@ -1081,7 +1081,7 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) {
// Unroll the loop.
if (!UnrollLoop(L, Count, TripCount, AllowRuntime, UP.AllowExpensiveTripCount,
- TripMultiple, LI, SE, &DT, &AC, PreserveLCSSA, &LPM))
+ TripMultiple, LI, SE, &DT, &AC, PreserveLCSSA))
return false;
return true;
OpenPOWER on IntegriCloud