1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
4 ** Authors: Martin Trapp, Christian Schaefer
6 ** irgraph.h: ir graph construction
11 # ifndef _IRGRAPH_T_H_
12 # define _IRGRAPH_T_H_
17 #define FRAME_TP_SUFFIX "frame_tp"
19 /* ir_graph holds all information for a procedure */
21 /** Basics of the representation **/
22 struct entity *ent; /* The entity of this procedure, i.e.,
23 the type of the procedure and the
24 class it belongs to. */
25 struct type *frame_type; /* A class type representing the stack frame.
26 Can include "inner" methods. */
27 struct ir_node *start_block; /* block the start node will belong to */
28 struct ir_node *start; /* start node of this ir_graph */
29 struct ir_node *end_block; /* block the end node will belong to */
30 struct ir_node *end; /* end node of this ir_graph */
31 struct ir_node *cstore; /* constant store -- no more needed!! */
32 struct ir_node *frame; /* method's frame */
33 struct ir_node *globals; /* pointer to the data segment containing all
34 globals as well as global procedures. */
35 struct ir_node *args; /* methods arguments */
36 struct ir_node *bad; /* bad node of this ir_graph, the one and
38 struct obstack *obst; /* obstack where all of the ir_nodes live */
39 struct ir_node *current_block; /* block for newly gen_*()-erated
42 /** Fields indicating different states of irgraph **/
43 irg_phase_state phase_state; /* compiler phase */
44 op_pinned pinned; /* Flag for status of nodes */
45 irg_outs_state outs_state; /* Out edges. */
46 irg_dom_state dom_state; /* Dominator information */
48 /** Fields for construction **/
49 #if USE_EXPICIT_PHI_IN_STACK
50 struct Phi_in_stack *Phi_in_stack; /* needed for automatic Phi construction */
52 int n_loc; /* number of local variable in this
53 procedure including procedure parameters. */
55 /** Fields for optimizations / analysis information **/
56 pset *value_table; /* hash table for global value numbering (cse)
57 for optimizing use in iropt.c */
58 struct ir_node **outs; /* Space for the out arrays. */
60 /** Fields for Walking the graph **/
61 unsigned long visited; /* this flag is an identifier for
62 ir walk. it will be incremented
63 every time someone walks through
65 unsigned long block_visited; /* same as visited, for a complete block */
68 /* Make a rudimentary ir graph for the constant code.
69 Must look like a correct irg, spare everything else. */
70 ir_graph *new_const_code_irg();
73 set_irg_pinned (ir_graph *irg, op_pinned p);
75 # endif /* _IRGRAPH_T_H_ */