diff lib/Transforms/IPO/PruneEH.cpp @ 16:d405342cecb1

can eliminate tail call regardless of optimize level
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 24 Sep 2013 19:04:26 +0900
parents 9ad51c7bc036
children 5e1f5bc27634
line wrap: on
line diff
--- a/lib/Transforms/IPO/PruneEH.cpp	Tue Sep 17 21:32:34 2013 +0900
+++ b/lib/Transforms/IPO/PruneEH.cpp	Tue Sep 24 19:04:26 2013 +0900
@@ -107,7 +107,10 @@
         } else if (CheckReturn && isa<ReturnInst>(BB->getTerminator())) {
           SCCMightReturn = true;
         }
-
+#ifndef noCbC
+	else if(F->getReturnType()->is__CodeTy())
+	  SCCMightReturn = true;
+#endif
         // Invoke instructions don't allow unwinding to continue, so we are
         // only interested in call instructions.
         if (CheckUnwind && !SCCMightUnwind)