1 /* Callgraph handling code.
2 Copyright (C) 2003 Free Software Foundation, Inc.
3 Contributed by Jan Hubicka
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
25 /* The cgraph data strutcture.
26 Each function decl has assigned cgraph_node listing calees and callers. */
31 struct cgraph_edge
*callees
;
32 struct cgraph_edge
*callers
;
33 struct cgraph_node
*next
;
34 /* For nested functions points to function the node is nested in. */
35 struct cgraph_node
*origin
;
36 /* Points to first nested function, if any. */
37 struct cgraph_node
*nested
;
38 /* Pointer to the next function with same origin, if any. */
39 struct cgraph_node
*next_nested
;
42 /* Set when function must be output - it is externally visible
43 or it's address is taken. */
45 /* Set when function is reachable by call from other function
46 that is eighter reachable or needed. */
48 /* Set when the frontend has been asked to lower representation of this
49 function into trees. Callees lists are not available when lowered
52 /* Set when function is scheduled to be assembled. */
58 struct cgraph_node
*caller
, *callee
;
59 struct cgraph_edge
*next_caller
;
60 struct cgraph_edge
*next_callee
;
63 extern struct cgraph_node
*cgraph_nodes
;
64 extern int cgraph_n_nodes
;
67 void dump_cgraph
PARAMS ((FILE *));
68 void cgraph_remove_call
PARAMS ((tree
, tree
));
69 struct cgraph_edge
*cgraph_record_call
PARAMS ((tree
, tree
));
70 struct cgraph_node
*cgraph_node
PARAMS ((tree decl
));
71 bool cgraph_calls_p
PARAMS ((tree
, tree
));
74 void cgraph_finalize_function
PARAMS ((tree
, tree
));
75 void cgraph_finalize_compilation_unit
PARAMS ((void));
76 void cgraph_create_edges
PARAMS ((tree
, tree
));
77 void cgraph_optimize
PARAMS ((void));
78 void cgraph_mark_needed_node
PARAMS ((struct cgraph_node
*, int));
80 #endif /* GCC_CGRAPH_H */