Check in statistifying patch for Bill
authorChris Lattner <sabre@nondot.org>
Tue, 28 Oct 2003 23:14:59 +0000 (23:14 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 28 Oct 2003 23:14:59 +0000 (23:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9572 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/LowerSetJmp.cpp

index 3109fb120d05e812b8c8b4017384b27027c87bd8..01ff046f11455b7f7dbcb7ac73a3d57dce42728c 100644 (file)
@@ -51,6 +51,10 @@ namespace {
                                   "Number of longjmps transformed");
   Statistic<> SetJmpsTransformed("lowersetjmp",
                                  "Number of setjmps transformed");
+  Statistic<> CallsTransformed("lowersetjmp",
+                               "Number of calls invokified");
+  Statistic<> InvokesTransformed("lowersetjmp",
+                                 "Number of invokes modified");
 
   //===--------------------------------------------------------------------===//
   // LowerSetJmp pass implementation. This is subclassed from the "Pass"
@@ -445,6 +449,7 @@ void LowerSetJmp::visitCallInst(CallInst& CI)
 
   // The old terminator is useless now that we have the invoke inst.
   Term->getParent()->getInstList().erase(Term);
+  ++CallsTransformed;
 }
 
 // visitInvokeInst - Converting the "invoke" instruction is fairly
@@ -479,6 +484,7 @@ void LowerSetJmp::visitInvokeInst(InvokeInst& II)
   InstList.push_back(BR);
 
   II.setExceptionalDest(NewExceptBB);
+  ++InvokesTransformed;
 }
 
 // visitReturnInst - We want to destroy the setjmp map upon exit from the