From 8557e6c0c17a94ac6655aa6b5f56a23709410081 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 27 Aug 2011 04:40:37 +0000 Subject: [PATCH] These splits should be done whether they are critical edges or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138697 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SjLjEHPrepare.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/lib/CodeGen/SjLjEHPrepare.cpp b/lib/CodeGen/SjLjEHPrepare.cpp index e18cbeaeb36..ed020255127 100644 --- a/lib/CodeGen/SjLjEHPrepare.cpp +++ b/lib/CodeGen/SjLjEHPrepare.cpp @@ -145,14 +145,10 @@ void SjLjEHPass::markInvokeCallSite(InvokeInst *II, int InvokeNo, if (isa(II->getUnwindDest()->begin())) { // FIXME: New EH - This if-condition will be always true in the new scheme. if (II->getUnwindDest()->isLandingPad()) { - if (isCriticalEdge(II, 1)) { - SmallVector NewBBs; - SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(), - ".1", ".2", this, NewBBs); - LPadSuccMap[II] = *succ_begin(NewBBs[0]); - } else { - LPadSuccMap[II] = II->getUnwindDest(); - } + SmallVector NewBBs; + SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(), + ".1", ".2", this, NewBBs); + LPadSuccMap[II] = *succ_begin(NewBBs[0]); } else { SplitCriticalEdge(II, 1, this); } @@ -206,14 +202,10 @@ splitLiveRangesAcrossInvokes(SmallVector &Invokes) { // FIXME: New EH - This if-condition will be always true in the new scheme. if (II->getUnwindDest()->isLandingPad()) { - if (isCriticalEdge(II, 1)) { - SmallVector NewBBs; - SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(), - ".1", ".2", this, NewBBs); - LPadSuccMap[II] = *succ_begin(NewBBs[0]); - } else { - LPadSuccMap[II] = II->getUnwindDest(); - } + SmallVector NewBBs; + SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(), + ".1", ".2", this, NewBBs); + LPadSuccMap[II] = *succ_begin(NewBBs[0]); } else { SplitCriticalEdge(II, 1, this); } -- 2.34.1