From: Nick Lewycky Date: Sun, 9 Mar 2008 09:44:38 +0000 (+0000) Subject: SCCP also needs to be taught to follow unwind_to X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a66696ef0d6786befc7815cc25b37d2bc5e0010a;p=oota-llvm.git SCCP also needs to be taught to follow unwind_to git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48109 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index b1c923c2bdc..6493f0e4080 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1082,6 +1082,10 @@ void SCCPSolver::visitCallSite(CallSite CS) { } } Instruction *I = CS.getInstruction(); + + if (!CS.doesNotThrow() && I->getParent()->getUnwindDest()) + markEdgeExecutable(I->getParent(), I->getParent()->getUnwindDest()); + if (I->getType() == Type::VoidTy) return; LatticeVal &IV = ValueState[I];