From: Bill Wendling Date: Mon, 15 Aug 2011 18:22:00 +0000 (+0000) Subject: Mark the SCC as "might unwind" if we run into a 'resume' instruction. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bc4fcbbc7b61e21f154ec3a4687178ec20a5f09b;p=oota-llvm.git Mark the SCC as "might unwind" if we run into a 'resume' instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137627 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index b7e63dc4484..cbb80f07508 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -101,8 +101,9 @@ bool PruneEH::runOnSCC(CallGraphSCC &SCC) { // Check to see if this function performs an unwind or calls an // unwinding function. for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { - if (CheckUnwind && isa(BB->getTerminator())) { - // Uses unwind! + if (CheckUnwind && (isa(BB->getTerminator()) || + isa(BB->getTerminator()))) { + // Uses unwind / resume! SCCMightUnwind = true; } else if (CheckReturn && isa(BB->getTerminator())) { SCCMightReturn = true;