LLVM API Documentation
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/TargetFolder.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetLibraryInfo.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "bounds-checking" |
Typedefs | |
typedef IRBuilder< true, TargetFolder > | BuilderTy |
Functions | |
STATISTIC (ChecksAdded,"Bounds checks added") | |
STATISTIC (ChecksSkipped,"Bounds checks skipped") | |
STATISTIC (ChecksUnable,"Bounds checks unable to add") | |
INITIALIZE_PASS (BoundsChecking,"bounds-checking","Run-time bounds checking", false, false) BasicBlock *BoundsChecking | |
Variables | |
static cl::opt< bool > | SingleTrapBB ("bounds-checking-single-trap", cl::desc("Use one trap block per function")) |
#define DEBUG_TYPE "bounds-checking" |
Definition at line 30 of file BoundsChecking.cpp.
typedef IRBuilder<true, TargetFolder> BuilderTy |
Definition at line 39 of file BoundsChecking.cpp.
INITIALIZE_PASS | ( | BoundsChecking | , |
"bounds-checking" | , | ||
"Run-time bounds checking" | , | ||
false | , | ||
false | |||
) |
getTrapBB - create a basic block that traps. All overflowing conditions branch to this block. There's only one trap block per function.
Definition at line 71 of file BoundsChecking.cpp.
References llvm::BasicBlock::Create(), F(), llvm::Function::getContext(), llvm::Intrinsic::getDeclaration(), llvm::GlobalValue::getParent(), llvm::CallInst::setDoesNotReturn(), and SingleTrapBB.
STATISTIC | ( | ChecksAdded | , |
"Bounds checks added" | |||
) |
STATISTIC | ( | ChecksSkipped | , |
"Bounds checks skipped" | |||
) |
cl::opt<bool> SingleTrapBB("bounds-checking-single-trap", cl::desc("Use one trap block per function")) [static] |
Referenced by INITIALIZE_PASS().