aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-11-28 18:00:38 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-11-28 18:00:38 +0000
commitbb227c1b798f6d91dd946a0a9db79d1941911fab (patch)
tree713ca3234229dde715ec5e1081c3dc037b1c84b2 /include/llvm/Transforms
parent1981c2e8dcd1b62a15b475d7836a6bdb4f79d6b2 (diff)
downloadexternal_llvm-bb227c1b798f6d91dd946a0a9db79d1941911fab.zip
external_llvm-bb227c1b798f6d91dd946a0a9db79d1941911fab.tar.gz
external_llvm-bb227c1b798f6d91dd946a0a9db79d1941911fab.tar.bz2
Added documented rsprofiler interface. Also remove new profiler passes, the
old ones have been updated to implement the interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24499 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/Instrumentation.h2
-rw-r--r--include/llvm/Transforms/LinkAllPasses.h2
-rw-r--r--include/llvm/Transforms/RSProfiling.h30
3 files changed, 30 insertions, 4 deletions
diff --git a/include/llvm/Transforms/Instrumentation.h b/include/llvm/Transforms/Instrumentation.h
index 84e3e54..bc3e9e4 100644
--- a/include/llvm/Transforms/Instrumentation.h
+++ b/include/llvm/Transforms/Instrumentation.h
@@ -44,8 +44,6 @@ ModulePass *createTraceBasicBlockPass();
FunctionPass *createProfilePathsPass();
// Random Sampling Profiling Framework
-ModulePass* createBlockProfilerRSPass();
-ModulePass* createFunctionProfilerRSPass();
ModulePass* createNullProfilerRSPass();
FunctionPass* createRSProfilingPass();
diff --git a/include/llvm/Transforms/LinkAllPasses.h b/include/llvm/Transforms/LinkAllPasses.h
index f9ec5f1..2ec63ce 100644
--- a/include/llvm/Transforms/LinkAllPasses.h
+++ b/include/llvm/Transforms/LinkAllPasses.h
@@ -106,8 +106,6 @@ namespace {
(void) llvm::createTraceValuesPassForFunction();
(void) llvm::createUnifyFunctionExitNodesPass();
(void) llvm::createCondPropagationPass();
- (void) llvm::createBlockProfilerRSPass();
- (void) llvm::createFunctionProfilerRSPass();
(void) llvm::createNullProfilerRSPass();
(void) llvm::createRSProfilingPass();
diff --git a/include/llvm/Transforms/RSProfiling.h b/include/llvm/Transforms/RSProfiling.h
new file mode 100644
index 0000000..897f63e
--- /dev/null
+++ b/include/llvm/Transforms/RSProfiling.h
@@ -0,0 +1,30 @@
+//===- RSProfiling.cpp - Various profiling using random sampling ----------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the abstract interface that a profiler must implement to
+// support the random profiling transform.
+//
+//===----------------------------------------------------------------------===//
+
+namespace llvm {
+ //===--------------------------------------------------------------------===//
+ /// RSProfilers - The basic Random Sampling Profiler Interface Any profiler
+ /// that implements this interface can be transformed by the random sampling
+ /// pass to be sample based rather than always on.
+ ///
+ /// The only exposed function can be queried to find out if an instruction
+ /// was original or if it was inserted by the profiler. Implementations of
+ /// this interface are expected to chain to other implementations, such that
+ /// multiple profilers can be support simultaniously.
+ struct RSProfilers : public ModulePass {
+ /// isProfiling - This method returns true if the value passed it was
+ /// inserted by the profiler.
+ virtual bool isProfiling(Value* v) = 0;
+ };
+};