git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168511
91177308-0d34-0410-b5e6-
96231b3b80d8
// BoundsChecking - This pass instruments the code to perform run-time bounds
// checking on loads, stores, and other memory intrinsics.
// BoundsChecking - This pass instruments the code to perform run-time bounds
// checking on loads, stores, and other memory intrinsics.
-// Penalty is the maximum run-time that is acceptable for the user.
-//
-FunctionPass *createBoundsCheckingPass(unsigned Penalty = 5);
+FunctionPass *createBoundsCheckingPass();
struct BoundsChecking : public FunctionPass {
static char ID;
struct BoundsChecking : public FunctionPass {
static char ID;
- BoundsChecking(unsigned _Penalty = 5) : FunctionPass(ID), Penalty(_Penalty){
+ BoundsChecking() : FunctionPass(ID) {
initializeBoundsCheckingPass(*PassRegistry::getPassRegistry());
}
initializeBoundsCheckingPass(*PassRegistry::getPassRegistry());
}
BuilderTy *Builder;
Instruction *Inst;
BasicBlock *TrapBB;
BuilderTy *Builder;
Instruction *Inst;
BasicBlock *TrapBB;
BasicBlock *getTrapBB();
void emitBranchToTrap(Value *Cmp = 0);
BasicBlock *getTrapBB();
void emitBranchToTrap(Value *Cmp = 0);
-FunctionPass *llvm::createBoundsCheckingPass(unsigned Penalty) {
- return new BoundsChecking(Penalty);
+FunctionPass *llvm::createBoundsCheckingPass() {
+ return new BoundsChecking();