libFirm
callgraph.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19 
27 #ifndef FIRM_ANA_CALLGRAPH_H
28 #define FIRM_ANA_CALLGRAPH_H
29 
30 #include "firm_types.h"
31 #include "begin.h"
32 
53 typedef enum {
59 
62 
65 
67 FIRM_API size_t get_irg_n_callers(const ir_graph *irg);
68 
70 FIRM_API ir_graph *get_irg_caller(const ir_graph *irg, size_t pos);
71 
73 FIRM_API int is_irg_caller_backedge(const ir_graph *irg, size_t pos);
74 
77 
79 FIRM_API size_t get_irg_caller_loop_depth(const ir_graph *irg, size_t pos);
80 
82 FIRM_API size_t get_irg_n_callees(const ir_graph *irg);
83 
85 FIRM_API ir_graph *get_irg_callee(const ir_graph *irg, size_t pos);
86 
88 FIRM_API int is_irg_callee_backedge(const ir_graph *irg, size_t pos);
89 
92 
94 FIRM_API size_t get_irg_callee_loop_depth(const ir_graph *irg, size_t pos);
95 
98 FIRM_API size_t get_irg_loop_depth(const ir_graph *irg);
99 
102 FIRM_API size_t get_irg_recursion_depth(const ir_graph *irg);
103 
106 
112 FIRM_API void compute_callgraph(void);
113 
115 FIRM_API void free_callgraph(void);
116 
117 
119 typedef void callgraph_walk_func(ir_graph *g, void *env);
120 
137  callgraph_walk_func *post, void *env);
138 
143 
155 
157 typedef enum {
164 
167 
170 
173 
176 #include "end.h"
177 
178 #endif