[llvm-commits] [llvm] r107961 - /llvm/trunk/include/llvm/Analysis/LoopInfo.h
Gabor Greif
ggreif at gmail.com
Fri Jul 9 03:42:13 PDT 2010
Author: ggreif
Date: Fri Jul 9 05:42:13 2010
New Revision: 107961
URL: http://llvm.org/viewvc/llvm-project?rev=107961&view=rev
Log:
two more cases of reuse result of operator*, found by inspection
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=107961&r1=107960&r2=107961&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Fri Jul 9 05:42:13 2010
@@ -309,11 +309,13 @@
typename InvBlockTraits::ChildIteratorType PE =
InvBlockTraits::child_end(Header);
BlockT *Latch = 0;
- for (; PI != PE; ++PI)
- if (contains(*PI)) {
+ for (; PI != PE; ++PI) {
+ typename InvBlockTraits::NodeType *N = *PI;
+ if (contains(N)) {
if (Latch) return 0;
- Latch = *PI;
+ Latch = N;
}
+ }
return Latch;
}
@@ -425,10 +427,11 @@
for (typename InvBlockTraits::ChildIteratorType PI =
InvBlockTraits::child_begin(BB), PE = InvBlockTraits::child_end(BB);
PI != PE; ++PI) {
- if (std::binary_search(LoopBBs.begin(), LoopBBs.end(), *PI))
+ typename InvBlockTraits::NodeType *N = *PI;
+ if (std::binary_search(LoopBBs.begin(), LoopBBs.end(), N))
HasInsideLoopPreds = true;
else
- OutsideLoopPreds.push_back(*PI);
+ OutsideLoopPreds.push_back(N);
}
if (BB == getHeader()) {
More information about the llvm-commits
mailing list