summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2019-02-17 15:22:48 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2019-02-17 15:22:48 +0000
commitd72c1a0c5c66bc68b272518789bbebec307c9771 (patch)
tree87173650a83e71ff8d48605d2e766cf60c9ee31c /llvm/lib/Transforms
parent3e1193743c433e2fcc0b47912b425844deeaebe1 (diff)
downloadbcm5719-llvm-d72c1a0c5c66bc68b272518789bbebec307c9771.tar.gz
bcm5719-llvm-d72c1a0c5c66bc68b272518789bbebec307c9771.zip
[NFC] Fix name and clarifying comment for factored-out function
llvm-svn: 354220
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp b/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
index 124c55e8ea1..4f1213d92a3 100644
--- a/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
@@ -90,9 +90,10 @@ static void removeBlockFromLoops(BasicBlock *BB, Loop *FirstLoop,
Current->removeBlockFromLoop(BB);
}
-/// Find innermost loop that is reachable from \p BBs and contains loop \p L.
-static Loop *getInnermostSuccessorLoop(SmallPtrSetImpl<BasicBlock *> &BBs,
- Loop &L, LoopInfo &LI) {
+/// Find innermost loop that contains at least one block from \p BBs and
+/// contains the header of loop \p L.
+static Loop *getInnermostLoopFor(SmallPtrSetImpl<BasicBlock *> &BBs,
+ Loop &L, LoopInfo &LI) {
Loop *StillReachable = nullptr;
for (BasicBlock *BB : BBs) {
Loop *BBL = LI.getLoopFor(BB);
@@ -383,7 +384,7 @@ private:
// the current loop. We need to fix loop info accordingly. For this, we
// find the most nested loop that still contains L and remove L from all
// loops that are inside of it.
- Loop *StillReachable = getInnermostSuccessorLoop(LiveExitBlocks, L, LI);
+ Loop *StillReachable = getInnermostLoopFor(LiveExitBlocks, L, LI);
// Okay, our loop is no longer in the outer loop (and maybe not in some of
// its parents as well). Make the fixup.
OpenPOWER on IntegriCloud