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
This commit is contained in:
Andrew Lenharth
2005-11-28 18:00:38 +00:00
parent 1981c2e8dc
commit bb227c1b79
6 changed files with 93 additions and 139 deletions
@@ -24,18 +24,21 @@
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Instrumentation.h"
#include "RSProfiling.h"
#include "ProfilingUtils.h"
#include <iostream>
using namespace llvm;
namespace {
class FunctionProfiler : public ModulePass {
class FunctionProfiler : public RSProfilers_std {
bool runOnModule(Module &M);
};
RegisterOpt<FunctionProfiler> X("insert-function-profiling",
"Insert instrumentation for function profiling");
RegisterAnalysisGroup<RSProfilers, FunctionProfiler> XG;
}
ModulePass *llvm::createFunctionProfilerPass() {
@@ -74,12 +77,13 @@ bool FunctionProfiler::runOnModule(Module &M) {
namespace {
class BlockProfiler : public ModulePass {
class BlockProfiler : public RSProfilers_std {
bool runOnModule(Module &M);
};
RegisterOpt<BlockProfiler> Y("insert-block-profiling",
"Insert instrumentation for block profiling");
RegisterAnalysisGroup<RSProfilers, BlockProfiler> YG;
}
ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); }