libFirm
irdump.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_IR_IRDUMP_H
28 #define FIRM_IR_IRDUMP_H
29 
30 #include <stdio.h>
31 
32 #include "firm_types.h"
33 #include "begin.h"
34 
59 FIRM_API void dump_ir_graph(ir_graph *graph, const char *suffix);
60 
64 typedef void (*ir_prog_dump_func)(FILE *out);
65 
79 FIRM_API void dump_ir_prog_ext(ir_prog_dump_func func, const char *suffix);
80 
84 typedef void (*ir_graph_dump_func)(FILE *out, ir_graph *graph);
85 
99  const char *suffix);
100 
106 FIRM_API void dump_all_ir_graphs(const char *suffix);
107 
111 FIRM_API void ir_set_dump_path(const char *path);
112 
122 FIRM_API void ir_set_dump_filter(const char *name);
123 
125 FIRM_API const char *ir_get_dump_filter(void);
126 
128 FIRM_API int ir_should_dump(const char *name);
129 
139  const char *suffix);
140 
150 FIRM_API void dump_ir_graph_file(FILE *out, ir_graph *graph);
151 
160 FIRM_API void dump_cfg(FILE *out, ir_graph *graph);
161 
167 FIRM_API void dump_callgraph(FILE *out);
168 
177 FIRM_API void dump_typegraph(FILE *out);
178 
190 FIRM_API void dump_class_hierarchy(FILE *out);
191 
199 FIRM_API void dump_loop_tree(FILE *out, ir_graph *graph);
200 
206 FIRM_API void dump_callgraph_loop_tree(FILE *out);
207 
216 FIRM_API void dump_types_as_text(FILE *out);
217 
225 FIRM_API void dump_globals_as_text(FILE *out);
226 
233 FIRM_API void dump_loop(FILE *out, ir_loop *loop);
234 
237 FIRM_API void dump_graph_as_text(FILE *out, ir_graph *graph);
238 
240 FIRM_API void dump_entity_to_file(FILE *out, ir_entity *entity);
241 
243 FIRM_API void dump_type_to_file(FILE *out, ir_type *type);
244 
246 typedef enum {
249  dump_verbosity_fields = 0x00000002,
250  dump_verbosity_methods = 0x00000004,
251  dump_verbosity_nostatic = 0x00000040,
255  dump_verbosity_entattrs = 0x00000010,
278  dump_verbosity_max = 0x4FF00FBE
281 
282 
286 
292 typedef enum {
317  ir_dump_flag_loops = 1U << 10,
330 
339 
340 
348 
354 typedef int (*dump_node_vcgattr_func)(FILE *out, const ir_node *node, const ir_node *local);
355 
361 typedef int (*dump_edge_vcgattr_func)(FILE *out, const ir_node *node, int to);
362 
367 typedef void (*dump_node_edge_func)(FILE *out, const ir_node *node);
368 
373 
379 
385 
391 
397 
399 typedef void (dump_node_info_cb_t)(void *data, FILE *out, const ir_node *n);
400 
414 
421 FIRM_API void dump_remove_node_info_callback(void *handle);
422 
425 #include "end.h"
426 
427 #endif