#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
+#include "llvm/Transforms/Instrumentation.h"
#include "ProfilingUtils.h"
#include <iostream>
"Insert instrumentation for function profiling");
}
+ModulePass *llvm::createFunctionProfilerPass()
+{
+ return new FunctionProfiler();
+}
+
bool FunctionProfiler::runOnModule(Module &M) {
Function *Main = M.getMainFunction();
if (Main == 0) {
"Insert instrumentation for block profiling");
}
+ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); }
+
bool BlockProfiler::runOnModule(Module &M) {
Function *Main = M.getMainFunction();
if (Main == 0) {