]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - contrib/llvm/include/llvm/Analysis/ProfileInfoTypes.h
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / contrib / llvm / include / llvm / Analysis / ProfileInfoTypes.h
1 /*===-- ProfileInfoTypes.h - Profiling info shared constants --------------===*\
2 |*
3 |*                     The LLVM Compiler Infrastructure
4 |*
5 |* This file is distributed under the University of Illinois Open Source
6 |* License. See LICENSE.TXT for details.
7 |*
8 |*===----------------------------------------------------------------------===*|
9 |*
10 |* This file defines constants shared by the various different profiling
11 |* runtime libraries and the LLVM C++ profile info loader. It must be a
12 |* C header because, at present, the profiling runtimes are written in C.
13 |*
14 \*===----------------------------------------------------------------------===*/
15
16 #ifndef LLVM_ANALYSIS_PROFILEINFOTYPES_H
17 #define LLVM_ANALYSIS_PROFILEINFOTYPES_H
18
19 /* Included by libprofile. */
20 #if defined(__cplusplus)
21 extern "C" {
22 #endif
23
24 /* IDs to distinguish between those path counters stored in hashses vs arrays */
25 enum ProfilingStorageType {
26   ProfilingArray = 1,
27   ProfilingHash = 2
28 };
29
30 enum ProfilingType {
31   ArgumentInfo  = 1,   /* The command line argument block */
32   FunctionInfo  = 2,   /* Function profiling information  */
33   BlockInfo     = 3,   /* Block profiling information     */
34   EdgeInfo      = 4,   /* Edge profiling information      */
35   PathInfo      = 5,   /* Path profiling information      */
36   BBTraceInfo   = 6,   /* Basic block trace information   */
37   OptEdgeInfo   = 7    /* Edge profiling information, optimal version */
38 };
39
40 /*
41  * The header for tables that map path numbers to path counters.
42  */
43 typedef struct {
44   unsigned fnNumber; /* function number for these counters */
45   unsigned numEntries;   /* number of entries stored */
46 } PathProfileHeader;
47
48 /*
49  * Describes an entry in a tagged table for path counters.
50  */
51 typedef struct {
52   unsigned pathNumber;
53   unsigned pathCounter;
54 } PathProfileTableEntry;
55
56 #if defined(__cplusplus)
57 }
58 #endif
59
60 #endif /* LLVM_ANALYSIS_PROFILEINFOTYPES_H */