[llvm-branch-commits] [llvm-branch] r91010 - /llvm/branches/Apple/Zoidberg/lib/Transforms/Scalar/LICM.cpp

Eric Christopher echristo at apple.com
Wed Dec 9 16:27:47 PST 2009


Author: echristo
Date: Wed Dec  9 18:27:47 2009
New Revision: 91010

URL: http://llvm.org/viewvc/llvm-project?rev=91010&view=rev
Log:
Merging from mainline:

Sending        lib/Transforms/Scalar/LICM.cpp
Transmitting file data .
Committed revision 91009.


Modified:
    llvm/branches/Apple/Zoidberg/lib/Transforms/Scalar/LICM.cpp

Modified: llvm/branches/Apple/Zoidberg/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/Transforms/Scalar/LICM.cpp?rev=91010&r1=91009&r2=91010&view=diff

==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/branches/Apple/Zoidberg/lib/Transforms/Scalar/LICM.cpp Wed Dec  9 18:27:47 2009
@@ -160,16 +160,17 @@
 
       // Because the exit block is not in the loop, we know we have to get _at
       // least_ its immediate dominator.
-      do {
-        // Get next Immediate Dominator.
-        IDom = IDom->getIDom();
-
+      IDom = IDom->getIDom();
+      
+      while (IDom && IDom != BlockInLoopNode) {
         // If we have got to the header of the loop, then the instructions block
         // did not dominate the exit node, so we can't hoist it.
         if (IDom->getBlock() == LoopHeader)
           return false;
 
-      } while (IDom != BlockInLoopNode);
+        // Get next Immediate Dominator.
+        IDom = IDom->getIDom();
+      };
 
       return true;
     }





More information about the llvm-branch-commits mailing list