mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
72f17d97f3
Modified patch by Adam Preuss. This builds on the existing framework for block tracing, edge profiling and optimal edge profiling. See -help-hidden for new flags. For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs. llvm-svn: 124515
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
//===- ProfilingUtils.h - Helper functions shared by profilers --*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file 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 BasicBlock;
|
|
class PointerType;
|
|
|
|
void InsertProfilingInitCall(Function *MainFn, const char *FnName,
|
|
GlobalValue *Arr = 0,
|
|
PointerType *arrayType = 0);
|
|
void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
|
|
GlobalValue *CounterArray,
|
|
bool beginning = true);
|
|
}
|
|
|
|
#endif
|