[llvm-commits] [llvm] r153400 - /llvm/trunk/include/llvm/Analysis/LoopInfo.h
Rafael Espindola
rafael.espindola at gmail.com
Sat Mar 24 16:29:28 PDT 2012
Author: rafael
Date: Sat Mar 24 18:29:27 2012
New Revision: 153400
URL: http://llvm.org/viewvc/llvm-project?rev=153400&view=rev
Log:
Use the isReachableFromEntry method.
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=153400&r1=153399&r2=153400&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Sat Mar 24 18:29:27 2012
@@ -772,14 +772,12 @@
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
More information about the llvm-commits
mailing list