[llvm-commits] [llvm] r115971 - in /llvm/trunk: include/llvm-c/Initialization.h include/llvm/InitializePasses.h lib/Transforms/Instrumentation/CMakeLists.txt lib/Transforms/Instrumentation/Instrumentation.cpp
Owen Anderson
resistor at mac.com
Thu Oct 7 13:17:24 PDT 2010
Author: resistor
Date: Thu Oct 7 15:17:24 2010
New Revision: 115971
URL: http://llvm.org/viewvc/llvm-project?rev=115971&view=rev
Log:
Add initialization routines for Instrumentation.
Added:
llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp
Modified:
llvm/trunk/include/llvm-c/Initialization.h
llvm/trunk/include/llvm/InitializePasses.h
llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt
Modified: llvm/trunk/include/llvm-c/Initialization.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Initialization.h?rev=115971&r1=115970&r2=115971&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Initialization.h (original)
+++ llvm/trunk/include/llvm-c/Initialization.h Thu Oct 7 15:17:24 2010
@@ -27,6 +27,7 @@
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);
Modified: llvm/trunk/include/llvm/InitializePasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=115971&r1=115970&r2=115971&view=diff
==============================================================================
--- llvm/trunk/include/llvm/InitializePasses.h (original)
+++ llvm/trunk/include/llvm/InitializePasses.h Thu Oct 7 15:17:24 2010
@@ -38,6 +38,10 @@
/// 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&);
Modified: llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt?rev=115971&r1=115970&r2=115971&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt Thu Oct 7 15:17:24 2010
@@ -1,5 +1,6 @@
add_llvm_library(LLVMInstrumentation
EdgeProfiling.cpp
+ Instrumentation.cpp
OptimalEdgeProfiling.cpp
ProfilingUtils.cpp
)
Added: llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp?rev=115971&view=auto
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp (added)
+++ llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp Thu Oct 7 15:17:24 2010
@@ -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));
+}
More information about the llvm-commits
mailing list