diff options
-rw-r--r-- | llvm/include/llvm/Transforms/Instrumentation.h | 7 | ||||
-rw-r--r-- | llvm/include/llvm/Transforms/Scalar.h | 8 | ||||
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp (renamed from llvm/lib/Transforms/Scalar/BoundsChecking.cpp) | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/CMakeLists.txt | 1 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/CMakeLists.txt | 1 | ||||
-rw-r--r-- | llvm/test/Instrumentation/BoundsChecking/lit.local.cfg (renamed from llvm/test/Transforms/BoundsChecking/lit.local.cfg) | 0 | ||||
-rw-r--r-- | llvm/test/Instrumentation/BoundsChecking/many-trap.ll (renamed from llvm/test/Transforms/BoundsChecking/many-trap.ll) | 0 | ||||
-rw-r--r-- | llvm/test/Instrumentation/BoundsChecking/phi.ll (renamed from llvm/test/Transforms/BoundsChecking/phi.ll) | 0 | ||||
-rw-r--r-- | llvm/test/Instrumentation/BoundsChecking/simple.ll (renamed from llvm/test/Transforms/BoundsChecking/simple.ll) | 0 |
9 files changed, 9 insertions, 10 deletions
diff --git a/llvm/include/llvm/Transforms/Instrumentation.h b/llvm/include/llvm/Transforms/Instrumentation.h index bbf3a69d246..4b0c448acfc 100644 --- a/llvm/include/llvm/Transforms/Instrumentation.h +++ b/llvm/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/llvm/include/llvm/Transforms/Scalar.h b/llvm/include/llvm/Transforms/Scalar.h index 67f2e377f72..3dce6fe37fd 100644 --- a/llvm/include/llvm/Transforms/Scalar.h +++ b/llvm/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/llvm/lib/Transforms/Scalar/BoundsChecking.cpp b/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp index ef2f39d8583..09e0f144512 100644 --- a/llvm/lib/Transforms/Scalar/BoundsChecking.cpp +++ b/llvm/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/llvm/lib/Transforms/Instrumentation/CMakeLists.txt b/llvm/lib/Transforms/Instrumentation/CMakeLists.txt index eaa3a4000f8..00de882f171 100644 --- a/llvm/lib/Transforms/Instrumentation/CMakeLists.txt +++ b/llvm/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/llvm/lib/Transforms/Scalar/CMakeLists.txt b/llvm/lib/Transforms/Scalar/CMakeLists.txt index bf9cc66392a..a01e0661b1f 100644 --- a/llvm/lib/Transforms/Scalar/CMakeLists.txt +++ b/llvm/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/llvm/test/Transforms/BoundsChecking/lit.local.cfg b/llvm/test/Instrumentation/BoundsChecking/lit.local.cfg index 19eebc0ac7a..19eebc0ac7a 100644 --- a/llvm/test/Transforms/BoundsChecking/lit.local.cfg +++ b/llvm/test/Instrumentation/BoundsChecking/lit.local.cfg diff --git a/llvm/test/Transforms/BoundsChecking/many-trap.ll b/llvm/test/Instrumentation/BoundsChecking/many-trap.ll index 0bbb9592b05..0bbb9592b05 100644 --- a/llvm/test/Transforms/BoundsChecking/many-trap.ll +++ b/llvm/test/Instrumentation/BoundsChecking/many-trap.ll diff --git a/llvm/test/Transforms/BoundsChecking/phi.ll b/llvm/test/Instrumentation/BoundsChecking/phi.ll index 86b59222707..86b59222707 100644 --- a/llvm/test/Transforms/BoundsChecking/phi.ll +++ b/llvm/test/Instrumentation/BoundsChecking/phi.ll diff --git a/llvm/test/Transforms/BoundsChecking/simple.ll b/llvm/test/Instrumentation/BoundsChecking/simple.ll index 3d532c3cf3b..3d532c3cf3b 100644 --- a/llvm/test/Transforms/BoundsChecking/simple.ll +++ b/llvm/test/Instrumentation/BoundsChecking/simple.ll |