summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-01-08 19:08:53 +0000
committerJustin Bogner <mail@justinbogner.com>2016-01-08 19:08:53 +0000
commite9fb228d5920f81417b07a13582945d1f5f472f7 (patch)
treecde4605f4e27c68fdf8b7892b64885ad57ed8e4a /llvm/lib/Transforms/Scalar/LoopDeletion.cpp
parent23bcef990e4e3174c80928087b2970d73bb2283f (diff)
downloadbcm5719-llvm-e9fb228d5920f81417b07a13582945d1f5f472f7.tar.gz
bcm5719-llvm-e9fb228d5920f81417b07a13582945d1f5f472f7.zip
LoopInfo: Simplify ownership of Loop objects
It's strange that LoopInfo mostly owns the Loop objects, but that it defers deleting them to the loop pass manager. Instead, change the oddly named "updateUnloop" to "markAsRemoved" and have it queue the Loop object for deletion. We can't delete the Loop immediately when we remove it, since we need its pointer identity still, so we'll mark the object as "invalid" so that clients can see what's going on. llvm-svn: 257191
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopDeletion.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopDeletion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
index bc00ff3f3a4..7b1940b48c3 100644
--- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -245,7 +245,7 @@ bool LoopDeletion::runOnLoop(Loop *L, LPPassManager &) {
loopInfo.removeBlock(BB);
// The last step is to update LoopInfo now that we've eliminated this loop.
- loopInfo.updateUnloop(L);
+ loopInfo.markAsRemoved(L);
Changed = true;
++NumDeleted;
OpenPOWER on IntegriCloud