[llvm-commits] [llvm] r122801 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Cameron Zwarich
zwarich at apple.com
Mon Jan 3 20:43:31 PST 2011
Author: zwarich
Date: Mon Jan 3 22:43:31 2011
New Revision: 122801
URL: http://llvm.org/viewvc/llvm-project?rev=122801&view=rev
Log:
Avoid finding loop back edges when we are not splitting critical edges in
CodeGenPrepare (which is the default behavior).
Modified:
llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=122801&r1=122800&r2=122801&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Mon Jan 3 22:43:31 2011
@@ -119,8 +119,10 @@
// 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) {
More information about the llvm-commits
mailing list