From a68dfa0a328a5859012053ad0200a1e01465875b Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Tue, 16 Sep 2008 10:37:24 +0000 Subject: [PATCH] Fix possible loop in DAG while building start Barrier. [r22000] --- ir/be/beabi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ir/be/beabi.c b/ir/be/beabi.c index 257fe7321..51a3d9c35 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -1729,6 +1729,10 @@ static void modify_irg(be_abi_irg_t *env) DBG((dbg, LEVEL_1, "introducing abi on %+F\n", irg)); + /* Must fetch memory here, otherwise the start Barrier gets the wrong + * memory, which leads to loops in the DAG. */ + old_mem = get_irg_initial_mem(irg); + /* 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_method_value_param_type(method_type); @@ -1856,7 +1860,6 @@ static void modify_irg(be_abi_irg_t *env) obstack_free(&env->obst, rm); /* create a new initial memory proj */ - old_mem = get_irg_initial_mem(irg); assert(is_Proj(old_mem)); new_mem_proj = new_r_Proj(irg, get_nodes_block(old_mem), new_r_Unknown(irg, mode_T), mode_M, -- 2.20.1