[llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp EdgeProfiling.cpp TraceBasicBlocks.cpp
Jeff Cohen
jeffc at jolt-lang.org
Thu Jan 6 22:57:39 PST 2005
Changes in directory llvm/lib/Transforms/Instrumentation:
BlockProfiling.cpp updated: 1.10 -> 1.11
EdgeProfiling.cpp updated: 1.4 -> 1.5
TraceBasicBlocks.cpp updated: 1.9 -> 1.10
---
Log message:
Add missing createXxxPass functions
---
Diffs of the changes: (+17 -0)
Index: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
diff -u llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.10 llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.11
--- llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.10 Sun Sep 19 23:44:01 2004
+++ llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp Fri Jan 7 00:57:28 2005
@@ -23,6 +23,7 @@
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
+#include "llvm/Transforms/Instrumentation.h"
#include "ProfilingUtils.h"
#include <iostream>
@@ -37,6 +38,11 @@
"Insert instrumentation for function profiling");
}
+ModulePass *llvm::createFunctionProfilerPass()
+{
+ return new FunctionProfiler();
+}
+
bool FunctionProfiler::runOnModule(Module &M) {
Function *Main = M.getMainFunction();
if (Main == 0) {
@@ -77,6 +83,8 @@
"Insert instrumentation for block profiling");
}
+ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); }
+
bool BlockProfiler::runOnModule(Module &M) {
Function *Main = M.getMainFunction();
if (Main == 0) {
Index: llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
diff -u llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.4 llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.5
--- llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.4 Sun Sep 19 23:44:01 2004
+++ llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp Fri Jan 7 00:57:28 2005
@@ -22,6 +22,7 @@
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
+#include "llvm/Transforms/Instrumentation.h"
#include "ProfilingUtils.h"
#include <iostream>
#include <set>
@@ -36,6 +37,8 @@
"Insert instrumentation for edge profiling");
}
+ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); }
+
bool EdgeProfiler::runOnModule(Module &M) {
Function *Main = M.getMainFunction();
if (Main == 0) {
Index: llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
diff -u llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.9 llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.10
--- llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.9 Sun Sep 19 23:44:01 2004
+++ llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp Fri Jan 7 00:57:28 2005
@@ -18,6 +18,7 @@
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
+#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Instructions.h"
#include "ProfilingUtils.h"
#include "llvm/Support/Debug.h"
@@ -33,6 +34,11 @@
"Insert instrumentation for basic block tracing");
}
+ModulePass *llvm::createTraceBasicBlockPass()
+{
+ return new TraceBasicBlocks();
+}
+
static void InsertInstrumentationCall (BasicBlock *BB,
const std::string FnName,
unsigned BBNumber) {
More information about the llvm-commits
mailing list