[llvm] r186774 - Comment: try to clarify loop iteration order.
Andrew Trick
atrick at apple.com
Sat Jul 20 16:10:31 PDT 2013
Author: atrick
Date: Sat Jul 20 18:10:31 2013
New Revision: 186774
URL: http://llvm.org/viewvc/llvm-project?rev=186774&view=rev
Log:
Comment: try to clarify loop iteration order.
Modified:
llvm/trunk/lib/Analysis/LoopPass.cpp
Modified: llvm/trunk/lib/Analysis/LoopPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopPass.cpp?rev=186774&r1=186773&r2=186774&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopPass.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopPass.cpp Sat Jul 20 18:10:31 2013
@@ -188,6 +188,10 @@ bool LPPassManager::runOnFunction(Functi
// 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);
More information about the llvm-commits
mailing list