summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-09 10:42:13 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-09 10:42:13 +0000
commit48fb6abf130537bca374fcc521d8330c0bfd0267 (patch)
tree0c7245a960de7eaa7c596b577d93a098522c6f58
parent85b87f5b5a11cc2b8a798461a732bfe60d0c6b3d (diff)
downloadbcm5719-llvm-48fb6abf130537bca374fcc521d8330c0bfd0267.tar.gz
bcm5719-llvm-48fb6abf130537bca374fcc521d8330c0bfd0267.zip
two more cases of reuse result of operator*, found by inspection
llvm-svn: 107961
-rw-r--r--llvm/include/llvm/Analysis/LoopInfo.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h
index 4a5d5924785..9455fd84032 100644
--- a/llvm/include/llvm/Analysis/LoopInfo.h
+++ b/llvm/include/llvm/Analysis/LoopInfo.h
@@ -309,11 +309,13 @@ public:
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 @@ public:
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()) {
OpenPOWER on IntegriCloud