[llvm-commits] [llvm] r107959 - /llvm/trunk/include/llvm/Analysis/LoopInfo.h
Gabor Greif
ggreif at gmail.com
Fri Jul 9 02:50:51 PDT 2010
Author: ggreif
Date: Fri Jul 9 04:50:51 2010
New Revision: 107959
URL: http://llvm.org/viewvc/llvm-project?rev=107959&view=rev
Log:
reuse result of operator*, it is expensive to recompute
Modified:
llvm/trunk/include/llvm/Analysis/LoopInfo.h
Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=107959&r1=107958&r2=107959&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Fri Jul 9 04:50:51 2010
@@ -757,9 +757,11 @@
typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits;
for (typename InvBlockTraits::ChildIteratorType I =
InvBlockTraits::child_begin(BB), E = InvBlockTraits::child_end(BB);
- I != E; ++I)
- if (DT.dominates(BB, *I)) // If BB dominates its predecessor...
- TodoStack.push_back(*I);
+ I != E; ++I) {
+ typename InvBlockTraits::NodeType *N = *I;
+ if (DT.dominates(BB, N)) // If BB dominates its predecessor...
+ TodoStack.push_back(N);
+ }
if (TodoStack.empty()) return 0; // No backedges to this block...
More information about the llvm-commits
mailing list