SplitCriticalEdge checks to see if an edge is critical, don't check twice
authorChris Lattner <sabre@nondot.org>
Sat, 28 Oct 2006 06:38:14 +0000 (06:38 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Oct 2006 06:38:14 +0000 (06:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31255 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/CorrelatedExprs.cpp

index 4c5025659ccdb45085eca675da6d06f9f7fe1cbd..35e6a971f1518866c0d0535a7766b6593ab998b1 100644 (file)
@@ -621,8 +621,7 @@ void CEE::ForwardSuccessorTo(TerminatorInst *TI, unsigned SuccNo,
   // Make sure that we don't introduce critical edges from oldsucc now!
   for (unsigned i = 0, e = OldSucc->getTerminator()->getNumSuccessors();
        i != e; ++i)
-    if (isCriticalEdge(OldSucc->getTerminator(), i))
-      SplitCriticalEdge(OldSucc->getTerminator(), i, this);
+    SplitCriticalEdge(OldSucc->getTerminator(), i, this);
 
   // Since we invalidated the CFG, recalculate the dominator set so that it is
   // useful for later processing!