[llvm-commits] [llvm] r123071 - /llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp

Chris Lattner sabre at nondot.org
Sat Jan 8 10:47:43 PST 2011


Author: lattner
Date: Sat Jan  8 12:47:43 2011
New Revision: 123071

URL: http://llvm.org/viewvc/llvm-project?rev=123071&view=rev
Log:
reduce nesting.

Modified:
    llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp

Modified: llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp?rev=123071&r1=123070&r2=123071&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp Sat Jan  8 12:47:43 2011
@@ -254,13 +254,13 @@
     assert(SP == BB && "CFG broken");
     SP = NULL;
     return SplitBlock(Succ, Succ->begin(), P);
-  } else {
-    // Otherwise, if BB has a single successor, split it at the bottom of the
-    // block.
-    assert(BB->getTerminator()->getNumSuccessors() == 1 &&
-           "Should have a single succ!"); 
-    return SplitBlock(BB, BB->getTerminator(), P);
   }
+  
+  // Otherwise, if BB has a single successor, split it at the bottom of the
+  // block.
+  assert(BB->getTerminator()->getNumSuccessors() == 1 &&
+         "Should have a single succ!"); 
+  return SplitBlock(BB, BB->getTerminator(), P);
 }
 
 /// SplitBlock - Split the specified block at the specified instruction - every





More information about the llvm-commits mailing list