cd49c0fc788913945f65a912996432a3a8660b5e
[libfirm] / ir / ir / irprog_t.h
1
2 /* $Id$ */
3
4 /**
5  * @file irprog_t.h
6  */
7
8 # ifndef _IRPROG_T_H_
9 # define _IRPROG_T_H_
10
11 #include "irprog.h"
12 #include "firm_common_t.h"
13
14 /** ir_prog */
15 struct ir_prog {
16   firm_kind kind;
17   ir_graph  *main_irg;            /**< entry point to the compiled program
18                      or a list, in case we compile a library or the like? */
19   ir_graph **graphs;              /**< all graphs in the ir */
20   type      *glob_type;           /**< global type.  Must be a class as it can
21                                      have fields and procedures.  */
22   type     **types;               /**< all types in the ir */
23   ir_graph  *const_code_irg;      /**< This ir graph gives the proper environment
24                                      to allocate nodes the represent values
25                                      of constant entities. It is not meant as
26                                      a procedure.  */
27   /*struct obstack *obst;          * @@@ Should we place all types and
28                                      entities on an obstack, too? */
29
30 #ifdef DEBUG_libfirm
31   long max_node_nr;                /**< to generate unique numbers for nodes. */
32 #endif
33 };
34
35 INLINE void remove_irp_type_from_list (type *typ);
36
37 #ifdef DEBUG_libfirm
38 /** Returns a new, unique number to number nodes or the like. */
39 int get_irp_new_node_nr(void);
40 #endif
41
42 #endif /* ifndef _IRPROG_T_H_ */