X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fescape_ana.c;h=34a77db3e5a5320262d0522fecd53e13ce965c3a;hb=bf9be89cbbf5d6ca1b80fd5736b80f47c1a14e90;hp=72e0b63af0faa8116409810e6c5b4d5cca412063;hpb=e1397b01aceb38b6bb62c319007146af3b922f39;p=libfirm diff --git a/ir/opt/escape_ana.c b/ir/opt/escape_ana.c index 72e0b63af..34a77db3e 100644 --- a/ir/opt/escape_ana.c +++ b/ir/opt/escape_ana.c @@ -117,7 +117,8 @@ static int is_method_leaving_raise(ir_node *raise) * returns an Alloc node if the node adr Select * from one */ -static ir_node *is_depend_alloc(ir_node *adr) { +static ir_node *is_depend_alloc(ir_node *adr) +{ ir_node *alloc; if (!is_Sel(adr)) @@ -141,7 +142,8 @@ static ir_node *is_depend_alloc(ir_node *adr) { * determine if a value calculated by n "escape", ie * is stored somewhere we could not track */ -static int can_escape(ir_node *n) { +static int can_escape(ir_node *n) +{ int i, j, k; /* should always be pointer mode or we made some mistake */ @@ -485,11 +487,10 @@ static void transform_alloc_calls(ir_graph *irg, walk_env_t *env) mem = get_Call_mem(call); blk = get_nodes_block(call); turn_into_tuple(call, pn_Call_max); - set_Tuple_pred(call, pn_Call_M_regular, mem); - set_Tuple_pred(call, pn_Call_X_regular, new_r_Jmp(blk)); - set_Tuple_pred(call, pn_Call_X_except, new_r_Bad(irg)); - set_Tuple_pred(call, pn_Call_T_result, new_r_Bad(irg)); - set_Tuple_pred(call, pn_Call_M_except, mem); + set_Tuple_pred(call, pn_Call_M, mem); + set_Tuple_pred(call, pn_Call_X_regular, new_r_Jmp(blk)); + set_Tuple_pred(call, pn_Call_X_except, new_r_Bad(irg)); + set_Tuple_pred(call, pn_Call_T_result, new_r_Bad(irg)); set_Tuple_pred(call, pn_Call_P_value_res_base, new_r_Bad(irg)); ++env->nr_deads; @@ -560,7 +561,7 @@ void escape_analysis(int run_scalar_replace, check_alloc_entity_func callback) obstack_init(&obst); elist = NULL; - env = obstack_alloc(&obst, sizeof(*env)); + env = OALLOC(&obst, walk_env_t); env->found_allocs = NULL; env->dead_allocs = NULL; env->callback = callback; @@ -586,7 +587,7 @@ void escape_analysis(int run_scalar_replace, check_alloc_entity_func callback) elist = env; - env = obstack_alloc(&obst, sizeof(*env)); + env = OALLOC(&obst, walk_env_t); env->found_allocs = NULL; env->dead_allocs = NULL; env->callback = callback;