2011-10-30 Dmitry Plotnikov <dplotnikov@ispras.ru>
[official-gcc.git] / gcc / profile.h
bloba77d3c51e1d11f6030a7f59e8593daf630cf6223
1 /* Header file for minimum-cost maximal flow routines used to smooth basic
2 block and edge frequency counts.
3 Copyright (C) 2008
4 Free Software Foundation, Inc.
5 Contributed by Paul Yuan (yingbo.com@gmail.com)
6 and Vinodha Ramasamy (vinodha@google.com).
8 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
12 version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 #ifndef PROFILE_H
24 #define PROFILE_H
26 /* Additional information about edges. */
27 struct edge_info
29 unsigned int count_valid:1;
31 /* Is on the spanning tree. */
32 unsigned int on_tree:1;
34 /* Pretend this edge does not exist (it is abnormal and we've
35 inserted a fake to compensate). */
36 unsigned int ignore:1;
39 #define EDGE_INFO(e) ((struct edge_info *) (e)->aux)
41 /* Smoothes the initial assigned basic block and edge counts using
42 a minimum cost flow algorithm. */
43 extern void mcf_smooth_cfg (void);
45 extern gcov_type sum_edge_counts (VEC (edge, gc) *edges);
47 extern void init_node_map (void);
48 extern void del_node_map (void);
50 #endif /* PROFILE_H */