this file is not needed
[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 /* $Id$ */
10
11 # ifndef _IRGRAPH_T_H_
12 # define _IRGRAPH_T_H_
13 # include "obst.h"
14 # include "pset.h"
15 # include "irgraph.h"
16
17 /* ir_graph holds all information for a procedure */
18 struct ir_graph {
19   struct entity  *ent;               /* The entity of this procedure, i.e.,
20                                         the type of the procedure and the
21                                         class it belongs to. */
22   struct type    *frame_type;        /* A class type representing the stack frame.
23                                         Can include "inner" methods. */
24   struct ir_node *start_block;       /* block the start node will belong to */
25   struct ir_node *start;             /* start node of this ir_graph */
26   struct ir_node *end_block;         /* block the end node will belong to */
27   struct ir_node *end;               /* end node of this ir_graph */
28   struct ir_node *cstore;            /* constant store -- no more needed!! */
29   struct ir_node *frame;             /* method's frame */
30   struct ir_node *globals;           /* pointer to the data segment containing all
31                                         globals as well as global procedures. */
32   struct ir_node *args;              /* methods arguments */
33   struct ir_node *bad;               /* bad node of this ir_graph, the one and
34                                         only in this graph */
35   struct obstack *obst;              /* obstack where all of the ir_nodes live */
36 #if USE_EXPICIT_PHI_IN_STACK
37   struct Phi_in_stack *Phi_in_stack; /* needed for automatic Phi construction */
38 #endif
39   struct ir_node *current_block;     /* block for newly gen_*()-erated
40                                         ir_nodes */
41   int n_loc;                         /* number of local variable in this
42                                         procedure including procedure parameters. */
43   pset *value_table;                 /* value table for global value numbering
44                                         for optimizing use in iropt.c */
45   unsigned long visited;             /* this flag is an identifier for
46                                         ir walk. it will be incremented,
47                                         every time, someone walk through
48                                         the graph */
49   unsigned long block_visited;       /* same as visited, for a
50                                         complete block */
51 };
52
53 /* Make a rudimentary ir graph for the constant code.
54    Must look like a correct irg, spare everything else. */
55 ir_graph *new_const_code_irg();
56
57
58 # endif /* _IRGRAPH_T_H_ */