aboutsummaryrefslogtreecommitdiffstats
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
commit360fef5f4354be1c58089ed7610ba8d5f1f976f9 (patch)
tree74860cf199718ed046e4f7e151baaa447f67bf7b
parentfa873afbdf870bcc025e77f4932364f1a2e38a7b (diff)
downloadexternal_llvm-360fef5f4354be1c58089ed7610ba8d5f1f976f9.zip
external_llvm-360fef5f4354be1c58089ed7610ba8d5f1f976f9.tar.gz
external_llvm-360fef5f4354be1c58089ed7610ba8d5f1f976f9.tar.bz2
Comment: try to clarify loop iteration order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186774 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/LoopPass.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp
index 1540112..acf2ba6 100644
--- a/lib/Analysis/LoopPass.cpp
+++ b/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);