diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-09 10:42:13 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-09 10:42:13 +0000 |
commit | 8fe5ccc5850af3248992d182c5b7c079b50120fc (patch) | |
tree | 20da7cfb9b4a81d95c51b138277fc32de3550df6 /include/llvm/Analysis/LoopInfo.h | |
parent | 4fd6b397031d7b5baa01849c065ad7ef70882d83 (diff) | |
download | llvm-8fe5ccc5850af3248992d182c5b7c079b50120fc.tar.gz llvm-8fe5ccc5850af3248992d182c5b7c079b50120fc.tar.bz2 llvm-8fe5ccc5850af3248992d182c5b7c079b50120fc.tar.xz |
two more cases of reuse result of operator*, found by inspection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 4a5d592478..9455fd8403 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/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()) { |