]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/profile.h
2017-06-04 Dominique d'Humieres <dominiq@lps.ens.fr>
[thirdparty/gcc.git] / gcc / profile.h
CommitLineData
3aa71f9d
L
1/* Header file for minimum-cost maximal flow routines used to smooth basic
2 block and edge frequency counts.
cbe34bb5 3 Copyright (C) 2008-2017 Free Software Foundation, Inc.
3aa71f9d
L
4 Contributed by Paul Yuan (yingbo.com@gmail.com)
5 and Vinodha Ramasamy (vinodha@google.com).
6
7This file is part of GCC.
8GCC is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
10Software Foundation; either version 3, or (at your option) any later
11version.
12
13GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
17
18You should have received a copy of the GNU General Public License
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
21
22#ifndef PROFILE_H
23#define PROFILE_H
24
25/* Additional information about edges. */
11478306 26struct edge_profile_info
3aa71f9d
L
27{
28 unsigned int count_valid:1;
29
30 /* Is on the spanning tree. */
31 unsigned int on_tree:1;
32
33 /* Pretend this edge does not exist (it is abnormal and we've
34 inserted a fake to compensate). */
35 unsigned int ignore:1;
36};
37
11478306 38#define EDGE_INFO(e) ((struct edge_profile_info *) (e)->aux)
3aa71f9d 39
893479de
AM
40typedef struct gcov_working_set_info gcov_working_set_t;
41extern gcov_working_set_t *find_working_set (unsigned pct_times_10);
42extern void add_working_set (gcov_working_set_t *);
43
3aa71f9d
L
44/* Smoothes the initial assigned basic block and edge counts using
45 a minimum cost flow algorithm. */
46extern void mcf_smooth_cfg (void);
47
9771b263 48extern gcov_type sum_edge_counts (vec<edge, va_gc> *edges);
3aa71f9d 49
2fa3d31b 50extern void init_node_map (bool);
903d1e67
XDL
51extern void del_node_map (void);
52
f57ddb5b 53extern void get_working_sets (void);
2730ada7 54
59f2e9d8
AM
55/* Counter summary from the last set of coverage counts read by
56 profile.c. */
57extern const struct gcov_ctr_summary *profile_info;
58
3aa71f9d 59#endif /* PROFILE_H */