summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/LoopInfo.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-03-24 23:29:27 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-03-24 23:29:27 +0000
commiteede6c9075a3a872e0ea00bbd71ab6fa88b677cd (patch)
tree2487a0a75a61bb7f7062c8ab174c934e96426353 /include/llvm/Analysis/LoopInfo.h
parent858cd1c33c6ba47cf3401b1e00862aa22302af10 (diff)
downloadllvm-eede6c9075a3a872e0ea00bbd71ab6fa88b677cd.tar.gz
llvm-eede6c9075a3a872e0ea00bbd71ab6fa88b677cd.tar.bz2
llvm-eede6c9075a3a872e0ea00bbd71ab6fa88b677cd.tar.xz
Use the isReachableFromEntry method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r--include/llvm/Analysis/LoopInfo.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index f807d48d4e..8f44bed947 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -772,14 +772,12 @@ public:
LoopT *L = new LoopT(BB);
BBMap[BB] = L;
- BlockT *EntryBlock = BB->getParent()->begin();
-
while (!TodoStack.empty()) { // Process all the nodes in the loop
BlockT *X = TodoStack.back();
TodoStack.pop_back();
if (!L->contains(X) && // As of yet unprocessed??
- DT.dominates(EntryBlock, X)) { // X is reachable from entry block?
+ DT.isReachableFromEntry(X)) {
// Check to see if this block already belongs to a loop. If this occurs
// then we have a case where a loop that is supposed to be a child of
// the current loop was processed before the current loop. When this