X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fir%2Firtypes.h;h=9138099aeef7cb601554697ae00d92a7f4aecfea;hb=e882b686518c16d814ee7c317f59b686b1cb5d08;hp=d4dddf85e636722f348eda5b4a5f96951cc43d98;hpb=4ef40fb79647fb8a2fb3e974a93d4bb729f043bd;p=libfirm diff --git a/ir/ir/irtypes.h b/ir/ir/irtypes.h index d4dddf85e..9138099ae 100644 --- a/ir/ir/irtypes.h +++ b/ir/ir/irtypes.h @@ -413,6 +413,11 @@ typedef struct ir_def_use_edge { int pos; /** The position of this edge in use's input array. */ } ir_def_use_edge; +typedef struct ir_def_use_edges { + unsigned n_edges; + ir_def_use_edge edges[]; +} ir_def_use_edges; + /** * The common structure of an irnode. * If the node has some attributes, they are stored in the attr field. @@ -430,13 +435,12 @@ struct ir_node { shall replace a node. */ long node_nr; /**< A globally unique node number for each node. */ /* ------- Fields for optimizations / analysis information ------- */ - ir_def_use_edge *out; /**< array of def-use edges. */ - struct dbg_info *dbi; /**< A pointer to information for debug support. */ - /* ------- For debugging ------- */ -#ifdef DEBUG_libfirm - unsigned out_valid : 1; - unsigned flags : 31; -#endif + union { + ir_def_use_edges *out; /**< array of def-use edges. */ + unsigned n_outs; /**< number of def-use edges (temporarily used + during construction of datastructure ) */ + } o; + struct dbg_info *dbi; /**< A pointer to information for debug support. */ /* ------- For analyses -------- */ ir_loop *loop; /**< the loop the node is in. Access routines in irloop.h */ struct ir_node **deps; /**< Additional dependencies induced by state. */ @@ -510,14 +514,9 @@ struct ir_graph { struct obstack *obst; /**< The obstack where all of the ir_nodes live. */ ir_node *current_block; /**< Current block for newly gen_*()-erated ir_nodes. */ - /* -- Fields for graph properties -- */ - irg_inline_property inline_property; /**< How to handle inlineing. */ - mtp_additional_properties additional_properties; /**< Additional graph properties. */ - /* -- Fields indicating different states of irgraph -- */ ir_graph_properties_t properties; ir_graph_constraints_t constraints; - irg_phase_state phase_state; /**< Compiler phase. */ op_pin_state irg_pinned_state; /**< Flag for status of nodes. */ ir_typeinfo_state typeinfo_state; /**< Validity of type information. */ irg_callee_info_state callee_info_state; /**< Validity of callee information. */ @@ -533,7 +532,8 @@ struct ir_graph { /* -- Fields for optimizations / analysis information -- */ pset *value_table; /**< Hash table for global value numbering (cse) for optimizing use in iropt.c */ - ir_def_use_edge *outs; /**< Space for the Def-Use arrays. */ + struct obstack out_obst; /**< Space for the Def-Use arrays. */ + bool out_obst_allocated; ir_vrp_info vrp; /**< vrp info */ ir_loop *loop; /**< The outermost loop for this graph. */ @@ -560,8 +560,6 @@ struct ir_graph { ir_visited_t self_visited; /**< visited flag of the irg */ - unsigned estimated_node_count; /**< estimated number of nodes in this graph, - updated after every walk */ irg_edges_info_t edge_info; /**< edge info for automatic outs */ ir_node **idx_irn_map; /**< Array mapping node indexes to nodes. */ @@ -571,7 +569,6 @@ struct ir_graph { unsigned dump_nr; /**< number of graph dumps */ #ifdef DEBUG_libfirm - int n_outs; /**< Size wasted for outs */ long graph_nr; /**< a unique graph number for each graph to make output readable. */ #endif @@ -616,8 +613,6 @@ struct ir_prog { ident **global_asms; /**< An array of global ASM insertions. */ /* -- states of and access to generated information -- */ - irg_phase_state phase_state; /**< The state of construction. */ - ir_node **ip_outedges; /**< A huge Array that contains all out edges in interprocedural view. */