diff options
Diffstat (limited to 'lib/Transforms/Instrumentation/RSProfiling.h')
-rw-r--r-- | lib/Transforms/Instrumentation/RSProfiling.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/RSProfiling.h b/lib/Transforms/Instrumentation/RSProfiling.h new file mode 100644 index 0000000000..3ab125493b --- /dev/null +++ b/lib/Transforms/Instrumentation/RSProfiling.h @@ -0,0 +1,28 @@ +//===- 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. +// +//===----------------------------------------------------------------------===// +// +// See notes in RSProfiling.cpp +// +//===----------------------------------------------------------------------===// + +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 { + std::set<Value*> profcode; + virtual bool isProfiling(Value* v); + virtual ~RSProfilers() {} + virtual void getAnalysisUsage(AnalysisUsage &AU) const; + void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum, + GlobalValue *CounterArray); + }; +}; |