summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopPass.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-07-20 23:10:31 +0000
committerAndrew Trick <atrick@apple.com>2013-07-20 23:10:31 +0000
commitb5f3c44c3a05b4c80825970bdf603761ecdc0ff3 (patch)
treea3f231f592cb3057810f766a5eb1399f82a408e6 /llvm/lib/Analysis/LoopPass.cpp
parent985eb0b55032c9dc6ed33bdd6db4e931cac98e4a (diff)
downloadbcm5719-llvm-b5f3c44c3a05b4c80825970bdf603761ecdc0ff3.tar.gz
bcm5719-llvm-b5f3c44c3a05b4c80825970bdf603761ecdc0ff3.zip
Comment: try to clarify loop iteration order.
llvm-svn: 186774
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r--llvm/lib/Analysis/LoopPass.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index 1540112fe10..acf2ba63bd3 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -188,6 +188,10 @@ bool LPPassManager::runOnFunction(Function &F) {
// advantage in deleting uses in a later loop before optimizing the
// definitions in an earlier loop. If we find a clear reason to process in
// forward order, then a forward variant of LoopPassManager should be created.
+ //
+ // Note that LoopInfo::iterator visits loops in reverse program
+ // order. Here, reverse_iterator gives us a forward order, and the LoopQueue
+ // reverses the order a third time by popping from the back.
for (LoopInfo::reverse_iterator I = LI->rbegin(), E = LI->rend(); I != E; ++I)
addLoopIntoQueue(*I, LQ);
OpenPOWER on IntegriCloud