Move break-crit-edges before the predicate simplifier. Allows us to
optimize in more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30699 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp
index 715818c..b6de61b 100644
--- a/lib/Transforms/Scalar/PredicateSimplifier.cpp
+++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp
@@ -500,8 +500,10 @@
 }
 
 void PredicateSimplifier::getAnalysisUsage(AnalysisUsage &AU) const {
+  AU.addRequiredID(BreakCriticalEdgesID);
   AU.addRequired<DominatorTree>();
   AU.setPreservesCFG();
+  AU.addPreservedID(BreakCriticalEdgesID);
 }
 
 // resolve catches cases addProperty won't because it wasn't used as a
@@ -622,13 +624,7 @@
                                              PropertySet &NextPS) {
   assert(edge < TI->getNumSuccessors() && "Invalid index for edge.");
 
-  BasicBlock *BB     = TI->getParent(),
-             *BBNext = TI->getSuccessor(edge);
-
-  if (BBNext->getSinglePredecessor() == BB)
-    visitBasicBlock(BBNext, NextPS);
-  else
-    visitBasicBlock(BBNext, CurrentPS);
+  visitBasicBlock(TI->getSuccessor(edge), NextPS);
 }
 
 void PredicateSimplifier::proceedToSuccessors(PropertySet &KP,