diff options
-rw-r--r-- | include/llvm/Transforms/Instrumentation.h | 7 | ||||
-rw-r--r-- | include/llvm/Transforms/Scalar.h | 8 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/BoundsChecking.cpp (renamed from lib/Transforms/Scalar/BoundsChecking.cpp) | 2 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/Transforms/Scalar/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/Instrumentation/BoundsChecking/lit.local.cfg (renamed from test/Transforms/BoundsChecking/lit.local.cfg) | 0 | ||||
-rw-r--r-- | test/Instrumentation/BoundsChecking/many-trap.ll (renamed from test/Transforms/BoundsChecking/many-trap.ll) | 0 | ||||
-rw-r--r-- | test/Instrumentation/BoundsChecking/phi.ll (renamed from test/Transforms/BoundsChecking/phi.ll) | 0 | ||||
-rw-r--r-- | test/Instrumentation/BoundsChecking/simple.ll (renamed from test/Transforms/BoundsChecking/simple.ll) | 0 |
9 files changed, 9 insertions, 10 deletions
diff --git a/include/llvm/Transforms/Instrumentation.h b/include/llvm/Transforms/Instrumentation.h index bbf3a69d24..4b0c448acf 100644 --- a/include/llvm/Transforms/Instrumentation.h +++ b/include/llvm/Transforms/Instrumentation.h @@ -38,6 +38,13 @@ ModulePass *createAddressSanitizerPass(); // Insert ThreadSanitizer (race detection) instrumentation FunctionPass *createThreadSanitizerPass(); + +// 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); + } // End llvm namespace #endif diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index 67f2e377f7..3dce6fe37f 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -330,14 +330,6 @@ Pass *createCorrelatedValuePropagationPass(); //===----------------------------------------------------------------------===// // -// 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); - -//===----------------------------------------------------------------------===// -// // ObjCARCAPElim - ObjC ARC autorelease pool elimination. // Pass *createObjCARCAPElimPass(); diff --git a/lib/Transforms/Scalar/BoundsChecking.cpp b/lib/Transforms/Instrumentation/BoundsChecking.cpp index ef2f39d858..09e0f14451 100644 --- a/lib/Transforms/Scalar/BoundsChecking.cpp +++ b/lib/Transforms/Instrumentation/BoundsChecking.cpp @@ -13,7 +13,6 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "bounds-checking" -#include "llvm/Transforms/Scalar.h" #include "llvm/IRBuilder.h" #include "llvm/Intrinsics.h" #include "llvm/Pass.h" @@ -25,6 +24,7 @@ #include "llvm/Support/TargetFolder.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetData.h" +#include "llvm/Transforms/Instrumentation.h" using namespace llvm; static cl::opt<bool> SingleTrapBB("bounds-checking-single-trap", diff --git a/lib/Transforms/Instrumentation/CMakeLists.txt b/lib/Transforms/Instrumentation/CMakeLists.txt index eaa3a4000f..00de882f17 100644 --- a/lib/Transforms/Instrumentation/CMakeLists.txt +++ b/lib/Transforms/Instrumentation/CMakeLists.txt @@ -1,5 +1,6 @@ add_llvm_library(LLVMInstrumentation AddressSanitizer.cpp + BoundsChecking.cpp EdgeProfiling.cpp FunctionBlackList.cpp GCOVProfiling.cpp diff --git a/lib/Transforms/Scalar/CMakeLists.txt b/lib/Transforms/Scalar/CMakeLists.txt index bf9cc66392..a01e0661b1 100644 --- a/lib/Transforms/Scalar/CMakeLists.txt +++ b/lib/Transforms/Scalar/CMakeLists.txt @@ -1,7 +1,6 @@ add_llvm_library(LLVMScalarOpts ADCE.cpp BasicBlockPlacement.cpp - BoundsChecking.cpp CodeGenPrepare.cpp ConstantProp.cpp CorrelatedValuePropagation.cpp diff --git a/test/Transforms/BoundsChecking/lit.local.cfg b/test/Instrumentation/BoundsChecking/lit.local.cfg index 19eebc0ac7..19eebc0ac7 100644 --- a/test/Transforms/BoundsChecking/lit.local.cfg +++ b/test/Instrumentation/BoundsChecking/lit.local.cfg diff --git a/test/Transforms/BoundsChecking/many-trap.ll b/test/Instrumentation/BoundsChecking/many-trap.ll index 0bbb9592b0..0bbb9592b0 100644 --- a/test/Transforms/BoundsChecking/many-trap.ll +++ b/test/Instrumentation/BoundsChecking/many-trap.ll diff --git a/test/Transforms/BoundsChecking/phi.ll b/test/Instrumentation/BoundsChecking/phi.ll index 86b5922270..86b5922270 100644 --- a/test/Transforms/BoundsChecking/phi.ll +++ b/test/Instrumentation/BoundsChecking/phi.ll diff --git a/test/Transforms/BoundsChecking/simple.ll b/test/Instrumentation/BoundsChecking/simple.ll index 3d532c3cf3..3d532c3cf3 100644 --- a/test/Transforms/BoundsChecking/simple.ll +++ b/test/Instrumentation/BoundsChecking/simple.ll |