aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-01-04 04:43:31 +0000
committerCameron Zwarich <zwarich@apple.com>2011-01-04 04:43:31 +0000
commit95bb00414eba82cc1c058b558cd28bc28134c561 (patch)
tree862b6bc3f22ea88af03e12438e8c79bb909511e4 /lib/Transforms
parent70ecc97550635eec18d8c45577fc3ad24dcf8abc (diff)
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
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index f4edcc76ec..8df0b3ce47 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -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) {