mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
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:
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user