LLVM API Documentation
00001 //===- ProfilingUtils.h - Helper functions shared by profilers --*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This files defines a few helper functions which are used by profile 00011 // instrumentation code to instrument the code. This allows the profiler pass 00012 // to worry about *what* to insert, and these functions take care of *how* to do 00013 // it. 00014 // 00015 //===----------------------------------------------------------------------===// 00016 00017 #ifndef PROFILINGUTILS_H 00018 #define PROFILINGUTILS_H 00019 00020 namespace llvm { 00021 class Function; 00022 class GlobalValue; 00023 class BasicBlock; 00024 00025 void InsertProfilingInitCall(Function *MainFn, const char *FnName, 00026 GlobalValue *Arr = 0); 00027 void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum, 00028 GlobalValue *CounterArray); 00029 } 00030 00031 #endif