From 5a37af8f8c949f0269b108c9a2da793ae8b01af3 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Tue, 19 Jun 2007 17:06:48 +0000 Subject: [PATCH] Really fix the endless loop. [r14652] --- ir/be/beabi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ir/be/beabi.c b/ir/be/beabi.c index 781a7dfea..818b8714b 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -1555,6 +1555,7 @@ static ir_node *create_be_return(be_abi_irg_t *env, ir_node *irn, ir_node *bl, i typedef struct lower_frame_sels_env_t { be_abi_irg_t *env; ir_entity *value_param_list; /**< the list of all value param entities */ + ir_entity *value_param_tail; /**< the tail of the list of all value param entities */ } lower_frame_sels_env_t; /** @@ -1581,9 +1582,12 @@ static void lower_frame_sels_walker(ir_node *irn, void *data) { exchange(irn, nw); /* check, if it's a param sel and if have not seen this entity before */ - if (ptr == param_base && get_entity_link(ent) == NULL) { + if (ptr == param_base && + ent != ctx->value_param_tail && + get_entity_link(ent) == NULL) { set_entity_link(ent, ctx->value_param_list); ctx->value_param_list = ent; + if (ctx->value_param_tail == NULL) ctx->value_param_tail = ent; } } } @@ -1767,11 +1771,6 @@ static void modify_irg(be_abi_irg_t *env) /* set the links of all frame entities to NULL, we use it to detect if an entity is already linked in the value_param_list */ - tp = get_irg_frame_type(irg); - for (i = get_class_n_members(tp) - 1; i >= 0; --i) - set_entity_link(get_class_member(tp, i), NULL); - - /* same for the value_param type */ tp = get_method_value_param_type(method_type); if (tp != NULL) { for (i = get_struct_n_members(tp) - 1; i >= 0; --i) @@ -1781,6 +1780,7 @@ static void modify_irg(be_abi_irg_t *env) /* Convert the Sel nodes in the irg to frame load/store/addr nodes. */ ctx.env = env; ctx.value_param_list = NULL; + ctx.value_param_tail = NULL; irg_walk_graph(irg, lower_frame_sels_walker, NULL, &ctx); /* value_param_base anchor is not needed anymore now */ -- 2.20.1