blob: 7e8b85f4db4cc0e8b1484308c3a2242cd2ac1a26 [file] [log] [blame]
Chris Lattnerdae48f92004-03-08 17:06:13 +00001//===- ProfilingUtils.h - Helper functions shared by profilers --*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This files defines a few helper functions which are used by profile
11// instrumentation code to instrument the code. This allows the profiler pass
12// to worry about *what* to insert, and these functions take care of *how* to do
13// it.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef PROFILINGUTILS_H
18#define PROFILINGUTILS_H
19
20namespace llvm {
21 class Function;
22 class GlobalValue;
23 class ConstantPointerRef;
24 class BasicBlock;
25
26 void InsertProfilingInitCall(Function *MainFn, const char *FnName,
27 GlobalValue *Arr);
28 void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
29 ConstantPointerRef *CounterArray);
30}
31
32#endif