aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/ProfilingUtils.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-08 17:06:13 +0000
committerChris Lattner <sabre@nondot.org>2004-03-08 17:06:13 +0000
commit467dd2ec6192fca6fe1d2a4b339fbc9b45ca3b17 (patch)
tree0b0aadf37b4e2cb55fe6a6f23ef3474f0fe80c3b /lib/Transforms/Instrumentation/ProfilingUtils.h
parent9ee5d2296bcddc5a9d48cd3dcc46ca8dac2771a9 (diff)
Split utility functions out of BlockProfiling.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilingUtils.h')
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.h b/lib/Transforms/Instrumentation/ProfilingUtils.h
new file mode 100644
index 0000000000..7e8b85f4db
--- /dev/null
+++ b/lib/Transforms/Instrumentation/ProfilingUtils.h
@@ -0,0 +1,32 @@
+//===- ProfilingUtils.h - Helper functions shared by profilers --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This files defines a few helper functions which are used by profile
+// instrumentation code to instrument the code. This allows the profiler pass
+// to worry about *what* to insert, and these functions take care of *how* to do
+// it.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef PROFILINGUTILS_H
+#define PROFILINGUTILS_H
+
+namespace llvm {
+ class Function;
+ class GlobalValue;
+ class ConstantPointerRef;
+ class BasicBlock;
+
+ void InsertProfilingInitCall(Function *MainFn, const char *FnName,
+ GlobalValue *Arr);
+ void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
+ ConstantPointerRef *CounterArray);
+}
+
+#endif