diff options
author | Owen Anderson <resistor@mac.com> | 2010-10-07 20:17:24 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-10-07 20:17:24 +0000 |
commit | aa4897fa1323ef78d5e72a80c74e96eb21f72057 (patch) | |
tree | d9c4c06520c84a9fbf22150aa33d14cff3b6b7f4 | |
parent | 9e94000c164ac7aa9dd81d8a6823751ea49906a3 (diff) | |
download | external_llvm-aa4897fa1323ef78d5e72a80c74e96eb21f72057.zip external_llvm-aa4897fa1323ef78d5e72a80c74e96eb21f72057.tar.gz external_llvm-aa4897fa1323ef78d5e72a80c74e96eb21f72057.tar.bz2 |
Add initialization routines for Instrumentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115971 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm-c/Initialization.h | 1 | ||||
-rw-r--r-- | include/llvm/InitializePasses.h | 4 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/Instrumentation.cpp | 31 |
4 files changed, 37 insertions, 0 deletions
diff --git a/include/llvm-c/Initialization.h b/include/llvm-c/Initialization.h index 346e1f1..3b59abb 100644 --- a/include/llvm-c/Initialization.h +++ b/include/llvm-c/Initialization.h @@ -27,6 +27,7 @@ void LLVMInitializeTransformUtils(LLVMPassRegistryRef R); void LLVMInitializeScalarOpts(LLVMPassRegistryRef R); void LLVMInitializeInstCombine(LLVMPassRegistryRef R); void LLVMInitializeIPO(LLVMPassRegistryRef R); +void LLVMInitializeInstrumentation(LLVMPassRegistryRef R); void LLVMInitializeAnalysis(LLVMPassRegistryRef R); void LLVMInitializeIPA(LLVMPassRegistryRef R); void LLVMInitializeCodeGen(LLVMPassRegistryRef R); diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index 9ad5edc..583536a 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -38,6 +38,10 @@ void initializeInstCombine(PassRegistry&); /// initializeIPO - Initialize all passes linked into the IPO library. void initializeIPO(PassRegistry&); +/// initializeInstrumentation - Initialize all passes linked into the +/// Instrumentation library. +void initializeInstrumentation(PassRegistry&); + /// initializeAnalysis - Initialize all passes linked into the Analysis library. void initializeAnalysis(PassRegistry&); diff --git a/lib/Transforms/Instrumentation/CMakeLists.txt b/lib/Transforms/Instrumentation/CMakeLists.txt index 128bf48..80bb48c 100644 --- a/lib/Transforms/Instrumentation/CMakeLists.txt +++ b/lib/Transforms/Instrumentation/CMakeLists.txt @@ -1,5 +1,6 @@ add_llvm_library(LLVMInstrumentation EdgeProfiling.cpp + Instrumentation.cpp OptimalEdgeProfiling.cpp ProfilingUtils.cpp ) diff --git a/lib/Transforms/Instrumentation/Instrumentation.cpp b/lib/Transforms/Instrumentation/Instrumentation.cpp new file mode 100644 index 0000000..21dc7b9 --- /dev/null +++ b/lib/Transforms/Instrumentation/Instrumentation.cpp @@ -0,0 +1,31 @@ +//===-- Instrumentation.cpp - TransformUtils Infrastructure ---------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the common initialization infrastructure for the +// Instrumentation library. +// +//===----------------------------------------------------------------------===// + +#include "llvm/InitializePasses.h" +#include "llvm-c/Initialization.h" + +using namespace llvm; + +/// initializeInstrumentation - Initialize all passes in the TransformUtils +/// library. +void llvm::initializeInstrumentation(PassRegistry &Registry) { + initializeEdgeProfilerPass(Registry); + initializeOptimalEdgeProfilerPass(Registry); +} + +/// LLVMInitializeInstrumentation - C binding for +/// initializeInstrumentation. +void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) { + initializeInstrumentation(*unwrap(R)); +} |