Avoid finding loop back edges when we are not splitting critical edges in

CodeGenPrepare (which is the default behavior).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122801 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Cameron Zwarich 2011-01-04 04:43:31 +00:00
parent 70ecc97550
commit 95bb00414e

View File

@ -119,8 +119,10 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
// unconditional branch.
EverMadeChange |= EliminateMostlyEmptyBlocks(F);
// Now find loop back edges.
findLoopBackEdges(F);
// Now find loop back edges, but only if they are being used to decide which
// critical edges to split.
if (CriticalEdgeSplit)
findLoopBackEdges(F);
bool MadeChange = true;
while (MadeChange) {