irgraph: Use get_irg_obstack() instead of accessing irg->obst directly.
[libfirm] / ir / ir / irdump_t.h
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
20 /**
21  * @file
22  * @brief   Private header for irdump
23  */
24 #ifndef FIRM_IR_IRDUMPT_T_H
25 #define FIRM_IR_IRDUMPT_T_H
26
27 #include "irdump.h"
28 #include "irgraph_t.h"
29
30 void print_nodeid(FILE *F, const ir_node *node);
31 void print_irgid(FILE *F, const ir_graph *irg);
32 void print_typeid(FILE *F, const ir_type *type);
33 void print_entityid(FILE *F, const ir_entity *entity);
34 void print_loopid(FILE *F, const ir_loop *loop);
35
36 const char *get_irg_dump_name(const ir_graph *irg);
37
38 const char *get_ent_dump_name(const ir_entity *ent);
39
40 /**
41  * returns the name of a mode or "<ERROR>" if mode is NOT a mode object.
42  * in the later case, sets bad.
43  */
44 const char *get_mode_name_ex(const ir_mode *mode, int *bad);
45 /** dump the name of a node n to the File F. */
46 void dump_node_opcode(FILE *out, const ir_node *n);
47
48 void dump_node_label(FILE *out, const ir_node *n);
49
50 /** Writes vcg representation with title "PRINT_TYPEID(tp)" to file F. */
51 void dump_type_node(FILE *out, ir_type *tp);
52
53 void dump_vcg_header(FILE *out, const char *name, const char *layout, const char *orientation);
54 void dump_vcg_footer(FILE *out);
55 void dump_vcg_header_colors(FILE *out);
56 void dump_vcg_infonames(FILE *out);
57 void dump_node(FILE *out, const ir_node *node);
58
59 /** Write the irnode and all its attributes to the file passed.
60  * (plain text format) */
61 void dump_irnode_to_file(FILE *out, const ir_node *node);
62
63 #endif