From 68938268cbfae9ff53b7ae340008593d34f89a73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20Sch=C3=B6sser?= Date: Fri, 2 Apr 2004 14:14:05 +0000 Subject: [PATCH] Implemented the computation of outedges in interprocedural graphs 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 | 3 ++- ir/ir/irprog.c | 10 ++++++++++ ir/ir/irprog.h | 3 +++ ir/ir/irprog_t.h | 3 +++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ir/ir/irgwalk.c b/ir/ir/irgwalk.c index b46a93603..c5e94a892 100644 --- a/ir/ir/irgwalk.c +++ b/ir/ir/irgwalk.c @@ -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; } diff --git a/ir/ir/irprog.c b/ir/ir/irprog.c index 25a90f382..5a4a2c150 100644 --- a/ir/ir/irprog.c +++ b/ir/ir/irprog.c @@ -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); +} diff --git a/ir/ir/irprog.h b/ir/ir/irprog.h index 529ae7df2..6a9a9b078 100644 --- a/ir/ir/irprog.h +++ b/ir/ir/irprog.h @@ -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_ */ diff --git a/ir/ir/irprog_t.h b/ir/ir/irprog_t.h index 771986c9d..2a34ba039 100644 --- a/ir/ir/irprog_t.h +++ b/ir/ir/irprog_t.h @@ -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? */ -- 2.20.1