libFirm
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
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
{
54
irp_callgraph_none
,
55
irp_callgraph_consistent
,
56
irp_callgraph_inconsistent
,
57
irp_callgraph_and_calltree_consistent
58
}
irp_callgraph_state
;
59
61
FIRM_API
irp_callgraph_state
get_irp_callgraph_state
(
void
);
62
64
FIRM_API
void
set_irp_callgraph_state
(
irp_callgraph_state
s);
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
76
FIRM_API
int
has_irg_caller_backedge
(
const
ir_graph
*irg);
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
91
FIRM_API
int
has_irg_callee_backedge
(
const
ir_graph
*irg);
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
105
FIRM_API
double
get_irg_method_execution_frequency
(
const
ir_graph
*irg);
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
136
FIRM_API
void
callgraph_walk
(
callgraph_walk_func
*pre,
137
callgraph_walk_func
*post,
void
*env);
138
142
FIRM_API
void
find_callgraph_recursions
(
void
);
143
154
FIRM_API
void
analyse_loop_nesting_depth
(
void
);
155
157
typedef
enum
{
158
loop_nesting_depth_none
,
160
loop_nesting_depth_consistent
,
161
loop_nesting_depth_inconsistent
163
}
loop_nesting_depth_state
;
164
166
FIRM_API
loop_nesting_depth_state
get_irp_loop_nesting_depth_state
(
void
);
167
169
FIRM_API
void
set_irp_loop_nesting_depth_state
(
loop_nesting_depth_state
s);
170
172
FIRM_API
void
set_irp_loop_nesting_depth_state_inconsistent
(
void
);
173
176
#include "
end.h
"
177
178
#endif
libfirm
callgraph.h
Generated on Sat Nov 24 2012 19:13:48 for libFirm by
1.8.1.2