diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-11-28 18:00:38 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-11-28 18:00:38 +0000 |
commit | bb227c1b798f6d91dd946a0a9db79d1941911fab (patch) | |
tree | 713ca3234229dde715ec5e1081c3dc037b1c84b2 /lib/Transforms/Instrumentation/BlockProfiling.cpp | |
parent | 1981c2e8dcd1b62a15b475d7836a6bdb4f79d6b2 (diff) |
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/BlockProfiling.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/BlockProfiling.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp index f92f0ef6f0..9a85fc50d1 100644 --- a/lib/Transforms/Instrumentation/BlockProfiling.cpp +++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp @@ -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(); } |