diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-07-13 17:19:57 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-07-13 17:19:57 +0000 |
commit | 9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74 (patch) | |
tree | 9de1c5f67a98cd0e73c60838396486c984f63ac2 /include/llvm/Analysis/Dominators.h | |
parent | 1e3dec662ea18131c495db50caccc57f77b7a5fe (diff) | |
download | FreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.zip FreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.tar.gz |
Update LLVM to r108243.
Diffstat (limited to 'include/llvm/Analysis/Dominators.h')
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index f810310..1979d3f 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -246,22 +246,25 @@ protected: typename GraphT::NodeType* NewBBSucc = *GraphT::child_begin(NewBB); std::vector<typename GraphT::NodeType*> PredBlocks; - for (typename GraphTraits<Inverse<N> >::ChildIteratorType PI = - GraphTraits<Inverse<N> >::child_begin(NewBB), - PE = GraphTraits<Inverse<N> >::child_end(NewBB); PI != PE; ++PI) + typedef GraphTraits<Inverse<N> > InvTraits; + for (typename InvTraits::ChildIteratorType PI = + InvTraits::child_begin(NewBB), + PE = InvTraits::child_end(NewBB); PI != PE; ++PI) PredBlocks.push_back(*PI); - assert(!PredBlocks.empty() && "No predblocks??"); + assert(!PredBlocks.empty() && "No predblocks?"); bool NewBBDominatesNewBBSucc = true; - for (typename GraphTraits<Inverse<N> >::ChildIteratorType PI = - GraphTraits<Inverse<N> >::child_begin(NewBBSucc), - E = GraphTraits<Inverse<N> >::child_end(NewBBSucc); PI != E; ++PI) - if (*PI != NewBB && !DT.dominates(NewBBSucc, *PI) && - DT.isReachableFromEntry(*PI)) { + for (typename InvTraits::ChildIteratorType PI = + InvTraits::child_begin(NewBBSucc), + E = InvTraits::child_end(NewBBSucc); PI != E; ++PI) { + typename InvTraits::NodeType *ND = *PI; + if (ND != NewBB && !DT.dominates(NewBBSucc, ND) && + DT.isReachableFromEntry(ND)) { NewBBDominatesNewBBSucc = false; break; } + } // Find NewBB's immediate dominator and create new dominator tree node for // NewBB. @@ -704,7 +707,6 @@ public: } ~DominatorTree() { - DT->releaseMemory(); delete DT; } |