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