Makefile.in (stmp-docobjdir): New target; ensure $docobjdir exists.
[official-gcc.git] / gcc / value-prof.h
blob74b754a25d6641236b6c82e2a65327072617a9c2
1 /* Definitions for transformations based on profile information for values.
2 Copyright (C) 2003 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING. If not, write to the Free
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA. */
21 /* Supported histogram types. */
22 enum hist_type
24 HIST_TYPE_INTERVAL, /* Measures histogram of values inside a specified
25 interval. */
26 HIST_TYPE_POW2, /* Histogram of power of 2 values. */
27 HIST_TYPE_SINGLE_VALUE, /* Tries to identify the value that is (almost)
28 always constant. */
29 HIST_TYPE_CONST_DELTA /* Tries to identify the (almost) always constant
30 difference between two evaluations of a value. */
33 /* The value to measure. */
34 struct histogram_value
36 rtx value; /* The value to profile. */
37 enum machine_mode mode; /* And its mode. */
38 rtx seq; /* Insns required to count the profiled value. */
39 rtx insn; /* Insn before that to measure. */
40 enum hist_type type; /* Type of information to measure. */
41 unsigned n_counters; /* Number of required counters. */
42 union
44 struct
46 int int_start; /* First value in interval. */
47 int steps; /* Number of values in it. */
48 int may_be_less; /* May the value be below? */
49 int may_be_more; /* Or above. */
50 } intvl; /* Interval histogram data. */
51 struct
53 int may_be_other; /* If the value may be non-positive or not 2^k. */
54 } pow2; /* Power of 2 histogram data. */
55 } hdata; /* Profiled information specific data. */
58 extern void find_values_to_profile (unsigned *, struct histogram_value **);
59 extern void free_profiled_values (unsigned, struct histogram_value *);