xref: /dflybsd-src/contrib/gcc-4.7/gcc/ipa-utils.h (revision 04febcfb30580676d3e95f58a16c5137ee478b32)
1*e4b17023SJohn Marino /* Utilities for ipa analysis.
2*e4b17023SJohn Marino    Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
3*e4b17023SJohn Marino    Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
4*e4b17023SJohn Marino 
5*e4b17023SJohn Marino This file is part of GCC.
6*e4b17023SJohn Marino 
7*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify it under
8*e4b17023SJohn Marino the terms of the GNU General Public License as published by the Free
9*e4b17023SJohn Marino Software Foundation; either version 3, or (at your option) any later
10*e4b17023SJohn Marino version.
11*e4b17023SJohn Marino 
12*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13*e4b17023SJohn Marino WARRANTY; without even the implied warranty of MERCHANTABILITY or
14*e4b17023SJohn Marino FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15*e4b17023SJohn Marino for more details.
16*e4b17023SJohn Marino 
17*e4b17023SJohn Marino You should have received a copy of the GNU General Public License
18*e4b17023SJohn Marino along with GCC; see the file COPYING3.  If not see
19*e4b17023SJohn Marino <http://www.gnu.org/licenses/>.  */
20*e4b17023SJohn Marino 
21*e4b17023SJohn Marino #ifndef GCC_IPA_UTILS_H
22*e4b17023SJohn Marino #define GCC_IPA_UTILS_H
23*e4b17023SJohn Marino #include "tree.h"
24*e4b17023SJohn Marino #include "cgraph.h"
25*e4b17023SJohn Marino 
26*e4b17023SJohn Marino struct ipa_dfs_info {
27*e4b17023SJohn Marino   int dfn_number;
28*e4b17023SJohn Marino   int low_link;
29*e4b17023SJohn Marino   /* This field will have the samy value for any two nodes in the same strongly
30*e4b17023SJohn Marino      connected component.  */
31*e4b17023SJohn Marino   int scc_no;
32*e4b17023SJohn Marino   bool new_node;
33*e4b17023SJohn Marino   bool on_stack;
34*e4b17023SJohn Marino   struct cgraph_node* next_cycle;
35*e4b17023SJohn Marino   PTR aux;
36*e4b17023SJohn Marino };
37*e4b17023SJohn Marino 
38*e4b17023SJohn Marino 
39*e4b17023SJohn Marino 
40*e4b17023SJohn Marino /* In ipa-utils.c  */
41*e4b17023SJohn Marino void ipa_print_order (FILE*, const char *, struct cgraph_node**, int);
42*e4b17023SJohn Marino int ipa_reduced_postorder (struct cgraph_node **, bool, bool,
43*e4b17023SJohn Marino 			  bool (*ignore_edge) (struct cgraph_edge *));
44*e4b17023SJohn Marino void ipa_free_postorder_info (void);
45*e4b17023SJohn Marino int ipa_reverse_postorder (struct cgraph_node **);
46*e4b17023SJohn Marino tree get_base_var (tree);
47*e4b17023SJohn Marino 
48*e4b17023SJohn Marino 
49*e4b17023SJohn Marino #endif  /* GCC_IPA_UTILS_H  */
50*e4b17023SJohn Marino 
51*e4b17023SJohn Marino 
52