*** empty log message ***
[libfirm] / ir / ir / irgraph_t.h
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
3 **
4 ** Authors: Martin Trapp, Christian Schaefer
5 **
6 ** irgraph.h: ir graph construction
7 */
8
9 # ifndef _IRGRAPH_T_H_
10 # define _IRGRAPH_T_H_
11 # include "obst.h"
12 # include "pset.h"
13 # include "irgraph.h"
14
15 /* ir_graph holds all information for a procedure */
16 struct ir_graph {
17   struct entity  *ent;               /* The entity of this procedure, i.e.,
18                                         the type of the procedure and the
19                                         class it belongs to. */
20   struct ir_node *start_block;       /* block the start node will belong to */
21   struct ir_node *start;             /* start node of this ir_graph */
22   struct ir_node *end_block;         /* block the end node will belong to */
23   struct ir_node *end;               /* end node of this ir_graph */
24   struct ir_node *cstore;            /* constant store -- no more needed!! */
25   struct ir_node *frame;             /* method's frame */
26   struct ir_node *globals;           /* pointer to the data segment containing all
27                                         globals as well as global procedures. */
28   struct ir_node *args;              /* methods arguments */
29   struct ir_node *bad;               /* bad node of this ir_graph, the one and
30                                         only in this graph */
31   struct obstack *obst;              /* obstack where all of the ir_nodes live */
32 #if USE_EXPICIT_PHI_IN_STACK
33   struct Phi_in_stack *Phi_in_stack; /* needed for automatic Phi construction */
34 #endif
35   struct ir_node *current_block;     /* block for newly gen_*()-erated
36                                         ir_nodes */
37   int n_loc;                         /* number of local variable in this
38                                         procedure including procedure parameters. */
39   pset *value_table;                 /* value table for global value numbering
40                                         for optimizing use in iropt.c */
41   unsigned long visited;             /* this flag is an identifier for
42                                         ir walk. it will be incremented,
43                                         every time, someone walk through
44                                         the graph */
45   unsigned long block_visited;       /* same as visited, for a
46                                         complete block */
47 };
48 # endif /* _IRGRAPH_T_H_ */