summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-03-05 06:31:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-03-05 06:31:26 +0000
commitb7922dee156105ef958c55ff2b64cd473035e0a0 (patch)
treecb9a9b3d13c9e4c36fabe54e40c246343e300807 /llvm/lib
parent2b24f306df798194f2d2c636cb38cd47766dedaf (diff)
downloadbcm5719-llvm-b7922dee156105ef958c55ff2b64cd473035e0a0.tar.gz
bcm5719-llvm-b7922dee156105ef958c55ff2b64cd473035e0a0.zip
Do not split edges to EH landing pads. It will cause code size explosion.
llvm-svn: 66140
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 1f3a13cc9ce..85e57661c15 100644
--- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -327,6 +327,12 @@ static void SplitEdgeNicely(TerminatorInst *TI, unsigned SuccNum,
assert(isa<PHINode>(Dest->begin()) &&
"This should only be called if Dest has a PHI!");
+ // Do not split edges to EH landing pads.
+ if (InvokeInst *Invoke = dyn_cast<InvokeInst>(TI)) {
+ if (Invoke->getSuccessor(1) == Dest)
+ return;
+ }
+
// As a hack, never split backedges of loops. Even though the copy for any
// PHIs inserted on the backedge would be dead for exits from the loop, we
// assume that the cost of *splitting* the backedge would be too high.
OpenPOWER on IntegriCloud