summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/RSProfiling.h
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 /lib/Transforms/Instrumentation/RSProfiling.h
parent1981c2e8dcd1b62a15b475d7836a6bdb4f79d6b2 (diff)
downloadllvm-bb227c1b798f6d91dd946a0a9db79d1941911fab.tar.gz
llvm-bb227c1b798f6d91dd946a0a9db79d1941911fab.tar.bz2
llvm-bb227c1b798f6d91dd946a0a9db79d1941911fab.tar.xz
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 'lib/Transforms/Instrumentation/RSProfiling.h')
-rw-r--r--lib/Transforms/Instrumentation/RSProfiling.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Transforms/Instrumentation/RSProfiling.h b/lib/Transforms/Instrumentation/RSProfiling.h
index 3ab125493b..304ce08f7b 100644
--- a/lib/Transforms/Instrumentation/RSProfiling.h
+++ b/lib/Transforms/Instrumentation/RSProfiling.h
@@ -1,4 +1,4 @@
-//===- RSProfiling.cpp - Various profiling using random sampling ----------===//
+//===- RSProfiling.h - Various profiling using random sampling ----------===//
//
// The LLVM Compiler Infrastructure
//
@@ -10,18 +10,19 @@
// See notes in RSProfiling.cpp
//
//===----------------------------------------------------------------------===//
+#include "llvm/Transforms/RSProfiling.h"
namespace llvm {
- // By default, we provide some convienence stuff to clients, so they
- // can just store the instructions they create to do profiling.
- // also, handle all chaining issues.
- // a client is free to overwrite these, as long as it implements the
- // chaining itself.
- struct RSProfilers : public ModulePass {
+ /// RSProfilers_std - a simple support class for profilers that handles most
+ /// of the work of chaining and tracking inserted code.
+ struct RSProfilers_std : public RSProfilers {
std::set<Value*> profcode;
+ // Lookup up values in profcode
virtual bool isProfiling(Value* v);
- virtual ~RSProfilers() {}
+ // handles required chaining
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
+ // places counter updates in basic blocks and recordes added instructions in
+ // profcode
void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
GlobalValue *CounterArray);
};