[llvm-commits] [llvm] r72227 - /llvm/trunk/include/llvm/Analysis/Dominators.h

Eli Friedman eli.friedman at gmail.com
Thu May 21 14:08:47 PDT 2009


Author: efriedma
Date: Thu May 21 16:08:47 2009
New Revision: 72227

URL: http://llvm.org/viewvc/llvm-project?rev=72227&view=rev
Log:
Fix indentation.


Modified:
    llvm/trunk/include/llvm/Analysis/Dominators.h

Modified: llvm/trunk/include/llvm/Analysis/Dominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Dominators.h?rev=72227&r1=72226&r2=72227&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/Dominators.h (original)
+++ llvm/trunk/include/llvm/Analysis/Dominators.h Thu May 21 16:08:47 2009
@@ -249,26 +249,26 @@
          PE = GraphTraits<Inverse<N> >::child_end(NewBB); PI != PE; ++PI)
       PredBlocks.push_back(*PI);  
 
-      assert(!PredBlocks.empty() && "No predblocks??");
+    assert(!PredBlocks.empty() && "No predblocks??");
 
-      // The newly inserted basic block will dominate existing basic blocks iff the
-      // PredBlocks dominate all of the non-pred blocks.  If all predblocks dominate
-      // the non-pred blocks, then they all must be the same block!
-      //
-      bool NewBBDominatesNewBBSucc = true;
-      {
-        typename GraphT::NodeType* OnePred = PredBlocks[0];
-        size_t i = 1, e = PredBlocks.size();
-        for (i = 1; !DT.isReachableFromEntry(OnePred); ++i) {
-          assert(i != e && "Didn't find reachable pred?");
-          OnePred = PredBlocks[i];
-        }
+    // The newly inserted basic block will dominate existing basic blocks iff the
+    // PredBlocks dominate all of the non-pred blocks.  If all predblocks dominate
+    // the non-pred blocks, then they all must be the same block!
+    //
+    bool NewBBDominatesNewBBSucc = true;
+    {
+      typename GraphT::NodeType* OnePred = PredBlocks[0];
+      size_t i = 1, e = PredBlocks.size();
+      for (i = 1; !DT.isReachableFromEntry(OnePred); ++i) {
+        assert(i != e && "Didn't find reachable pred?");
+        OnePred = PredBlocks[i];
+      }
 
-        for (; i != e; ++i)
-          if (PredBlocks[i] != OnePred && DT.isReachableFromEntry(OnePred)) {
-            NewBBDominatesNewBBSucc = false;
-            break;
-          }
+      for (; i != e; ++i)
+        if (PredBlocks[i] != OnePred && DT.isReachableFromEntry(OnePred)) {
+          NewBBDominatesNewBBSucc = false;
+          break;
+        }
 
       if (NewBBDominatesNewBBSucc)
         for (typename GraphTraits<Inverse<N> >::ChildIteratorType PI =
@@ -288,7 +288,7 @@
       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)) {
+        if (*PI != NewBB && !DT.dominates(NewBBSucc, *PI)) {
           NewBBDominatesNewBBSucc = false;
           break;
         }





More information about the llvm-commits mailing list