[llvm-commits] [llvm] r137627 - /llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
Bill Wendling
isanbard at gmail.com
Mon Aug 15 11:22:01 PDT 2011
Author: void
Date: Mon Aug 15 13:22:00 2011
New Revision: 137627
URL: http://llvm.org/viewvc/llvm-project?rev=137627&view=rev
Log:
Mark the SCC as "might unwind" if we run into a 'resume' instruction.
Modified:
llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
Modified: llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PruneEH.cpp?rev=137627&r1=137626&r2=137627&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PruneEH.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PruneEH.cpp Mon Aug 15 13:22:00 2011
@@ -101,8 +101,9 @@
// 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<UnwindInst>(BB->getTerminator())) {
- // Uses unwind!
+ if (CheckUnwind && (isa<UnwindInst>(BB->getTerminator()) ||
+ isa<ResumeInst>(BB->getTerminator()))) {
+ // Uses unwind / resume!
SCCMightUnwind = true;
} else if (CheckReturn && isa<ReturnInst>(BB->getTerminator())) {
SCCMightReturn = true;
More information about the llvm-commits
mailing list