Implemented the computation of outedges in interprocedural graphs
authorAndreas Schösser <andi@ipd.info.uni-karlsruhe.de>
Fri, 2 Apr 2004 14:14:05 +0000 (14:14 +0000)
committerAndreas Schösser <andi@ipd.info.uni-karlsruhe.de>
Fri, 2 Apr 2004 14:14:05 +0000 (14:14 +0000)
using the general walker cg_walk for ip graphs.
In irprog: Added a field in the prog struture which
contains the interprocedural outedges

[r2622]

ir/ir/irgwalk.c
ir/ir/irprog.c
ir/ir/irprog.h
ir/ir/irprog_t.h

index b46a936..c5e94a8 100644 (file)
@@ -234,7 +234,8 @@ cg_walk_2(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env)
     if (is_no_Block(node))
       cg_walk_2(get_nodes_block(node), pre, post, env);
     for (i = get_irn_arity(node) - 1; i >= 0; --i) {
-      rem = switch_irg(node, i);
+      rem = switch_irg(node, i);  /* @@@ AS: Is this wrong? We do have to
+                                             switch to the irg of the predecessor, don't we? */
       cg_walk_2(get_irn_n(node, i), pre, post, env);
       current_ir_graph = rem;
     }
index 25a90f3..5a4a2c1 100644 (file)
@@ -204,3 +204,13 @@ ir_graph *get_const_code_irg(void)
 {
   return irp->const_code_irg;
 }
+
+void      set_irp_ip_outedges(ir_node ** ip_outedges)
+{
+  irp -> ip_outedges = ip_outedges;
+}
+
+ir_node** get_irp_ip_outedges(void)
+{
+  return(irp -> ip_outedges);
+}
index 529ae7d..6a9a9b0 100644 (file)
@@ -137,4 +137,7 @@ const char  *get_irp_prog_name (void);
  */
 ir_graph *get_const_code_irg(void);
 
+void      set_irp_ip_outedges(ir_node ** ip_outedges);
+ir_node** get_irp_ip_outedges(void);
+
 #endif /* ifndef _IRPROG_H_ */
index 771986c..2a34ba0 100644 (file)
@@ -38,6 +38,9 @@ struct ir_prog {
                                     to allocate nodes the represent values
                                     of constant entities. It is not meant as
                                     a procedure.  */
+
+  ir_node **ip_outedges;         /**< Huge Array that contains all out edges
+                                   in interprocedural view. */
   ident     *name;
   /*struct obstack *obst;         * @@@ Should we place all types and
                                      entities on an obstack, too? */