diff options
author | Stefanos Baziotis <sdi1600105@di.uoa.gr> | 2020-09-22 23:28:00 +0300 |
---|---|---|
committer | Stefanos Baziotis <sdi1600105@di.uoa.gr> | 2020-09-22 23:28:51 +0300 |
commit | 89c1e35f3c5060c23f9eed409f89c2c9908b87ed (patch) | |
tree | 7b667eddfb0217898e6a8e232463a808216b6188 /llvm/lib/Analysis/LoopInfo.cpp | |
parent | 4edb3d3646c46f15ca93bf19ed96a9169143ed6d (diff) | |
download | llvm-89c1e35f3c5060c23f9eed409f89c2c9908b87ed.zip llvm-89c1e35f3c5060c23f9eed409f89c2c9908b87ed.tar.gz llvm-89c1e35f3c5060c23f9eed409f89c2c9908b87ed.tar.bz2 |
[LoopInfo] empty() -> isInnermost(), add isOutermost()
Differential Revision: https://reviews.llvm.org/D82895
Diffstat (limited to 'llvm/lib/Analysis/LoopInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index b5af210..46d6eb62 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -764,7 +764,7 @@ void UnloopUpdater::removeBlocksFromAncestors() { /// Update the parent loop for all subloops directly nested within unloop. void UnloopUpdater::updateSubloopParents() { - while (!Unloop.empty()) { + while (!Unloop.isInnermost()) { Loop *Subloop = *std::prev(Unloop.end()); Unloop.removeChildLoop(std::prev(Unloop.end())); @@ -862,7 +862,7 @@ void LoopInfo::erase(Loop *Unloop) { auto InvalidateOnExit = make_scope_exit([&]() { destroy(Unloop); }); // First handle the special case of no parent loop to simplify the algorithm. - if (!Unloop->getParentLoop()) { + if (Unloop->isOutermost()) { // Since BBLoop had no parent, Unloop blocks are no longer in a loop. for (Loop::block_iterator I = Unloop->block_begin(), E = Unloop->block_end(); @@ -887,7 +887,7 @@ void LoopInfo::erase(Loop *Unloop) { } // Move all of the subloops to the top-level. - while (!Unloop->empty()) + while (!Unloop->isInnermost()) addTopLevelLoop(Unloop->removeChildLoop(std::prev(Unloop->end()))); return; |