SplitCriticalEdge checks to see if an edge is critical, don't check twice

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-10-28 06:38:14 +00:00
parent 6fb6ef4d65
commit f6de8ad1a2

View 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!