mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Check in statistifying patch for Bill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -51,6 +51,10 @@ namespace {
|
|||||||
"Number of longjmps transformed");
|
"Number of longjmps transformed");
|
||||||
Statistic<> SetJmpsTransformed("lowersetjmp",
|
Statistic<> SetJmpsTransformed("lowersetjmp",
|
||||||
"Number of setjmps transformed");
|
"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"
|
// 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.
|
// The old terminator is useless now that we have the invoke inst.
|
||||||
Term->getParent()->getInstList().erase(Term);
|
Term->getParent()->getInstList().erase(Term);
|
||||||
|
++CallsTransformed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// visitInvokeInst - Converting the "invoke" instruction is fairly
|
// visitInvokeInst - Converting the "invoke" instruction is fairly
|
||||||
@ -479,6 +484,7 @@ void LowerSetJmp::visitInvokeInst(InvokeInst& II)
|
|||||||
InstList.push_back(BR);
|
InstList.push_back(BR);
|
||||||
|
|
||||||
II.setExceptionalDest(NewExceptBB);
|
II.setExceptionalDest(NewExceptBB);
|
||||||
|
++InvokesTransformed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// visitReturnInst - We want to destroy the setjmp map upon exit from the
|
// visitReturnInst - We want to destroy the setjmp map upon exit from the
|
||||||
|
Reference in New Issue
Block a user