X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fscalar_replace.c;h=1c04d06d20a2bf15ee9fbb0fe45bf440037b6579;hb=98ca7e71bc79bb2a3b2ccb039df78000fc48e70a;hp=fccd1d3ae6c411b42dc8c021161de00305c7df76;hpb=d5ec64e99398e78c0e646fa6a30dc9e5bcb22241;p=libfirm diff --git a/ir/opt/scalar_replace.c b/ir/opt/scalar_replace.c index fccd1d3ae..1c04d06d2 100644 --- a/ir/opt/scalar_replace.c +++ b/ir/opt/scalar_replace.c @@ -361,13 +361,12 @@ static void *PRED_SEARCH = &q; * * @param node A Load or Phi node. The predecessor of this node muss be faund. * @param value A struct pointer, that contains the block of node and their link. - * @parm repairs A set, that contains all blocks, that have a array as link, and all Phis, that + * @param repairs A set, that contains all blocks, that have a array as link, and all Phis, that * have copies to repair. * @param pos The position, that muss contain the predecessor of node, in the array, that have got the bloks * from the repairs set. * @param phi_pred If node is a Phi, phi_pred is the predecessor number of this Phi, that muss be repair. */ - static void pred_search(ir_node *node, repairs_t *value, set *repairs, int pos, int phi_pred) { ir_node *nodes_block; @@ -426,8 +425,8 @@ static void pred_search(ir_node *node, repairs_t *value, set *repairs, int pos, * * @param node A Phi, Load or Store node, that block muss get a link. * @param env Contains information about scalars number and mode. - * @parm repairs A set, that contains all blocks, that have a link, and all Phis, that - * have copies to repair. + * @param repairs A set, that contains all blocks, that have a link, and all Phis, that + * have copies to repair. */ static void block_link(ir_node *node, env_t *env, set *repairs) { @@ -456,8 +455,8 @@ static void block_link(ir_node *node, env_t *env, set *repairs) * * @param phi A Phi node, that muss have mode_M. * @param env Contains information about scalars number and mode. - * @parm repairs A set that contains all blocks having a link and all Phis that - * have copies to repair. + * @param repairs A set that contains all blocks having a link and all Phis that + * have copies to repair. */ static void phi_handling(ir_node *phi, env_t *env, set *repairs) { @@ -534,8 +533,8 @@ static void phi_handling(ir_node *phi, env_t *env, set *repairs) * * @param load A load node. * @param env Contains information about scalars number and mode. - * @parm repairs A set, that contains all blocks, that have a link, and all Phis, that - * have copies to repair. + * @param repairs A set, that contains all blocks, that have a link, and all Phis, that + * have copies to repair. */ static void load_handling(ir_node *load, env_t *env, set *repairs) { @@ -589,7 +588,7 @@ static void load_handling(ir_node *load, env_t *env, set *repairs) * * @param node A node from the graph. * @param env Contains information about scalars number and mode. - * @parm repairs A set, that contains all blocks, that have a link, and all Phis, that + * @param repairs A set, that contains all blocks, that have a link, and all Phis, that * have copies to repair. */ static void memory_edge_walk2(ir_node *node, env_t *env, set *repairs) @@ -649,7 +648,7 @@ static void memory_edge_walk2(ir_node *node, env_t *env, set *repairs) * * @param *node A node from the graph. * @param *env Contains information about scalars number and mode. - * @parm *repairs A set, that contains all blocks, that have a link, and all Phis, that + * @param *repairs A set, that contains all blocks, that have a link, and all Phis, that * have copies to repair. */ static void loop_walk(ir_node *node, env_t *env, set *repairs) @@ -713,13 +712,13 @@ static void loop_walk(ir_node *node, env_t *env, set *repairs) * * @param load A store node. * @param env Contains information about scalars number and mode. - * @parm repairs A set, that contains all blocks, that have a link, and all Phis, that + * @param repairs A set, that contains all blocks, that have a link, and all Phis, that * have copies to repair. */ static void store_handling(ir_node *store, env_t *env, set *repairs) { repairs_t key, *value; - ir_node *nods_block, *store_mem, *store_ptr, *store_value, **link, *phi; + ir_node *nods_block, *store_mem, *store_ptr, *store_value, *phi; ir_loop *store_l; store_ptr = get_Store_ptr(store); @@ -768,9 +767,6 @@ static void store_handling(ir_node *store, env_t *env, set *repairs) turn_into_tuple(store, pn_Store_max); set_Tuple_pred(store, pn_Store_M, store_mem); set_Tuple_pred(store, pn_Store_X_except, new_Bad()); - - /* FIXME: link is uninitialized here */ - set_irn_link(nods_block, link); } } @@ -779,7 +775,7 @@ static void store_handling(ir_node *store, env_t *env, set *repairs) * * @param node A node from the graph. * @param env Contains information about scalars number and mode. - * @parm repairs A set, that contains all blocks, that have a link, and all Phis, that + * @param repairs A set, that contains all blocks, that have a link, and all Phis, that * have copies to repair. */ static void memory_edge_walk(ir_node *node, env_t *env, set *repairs) @@ -830,7 +826,7 @@ static void memory_edge_walk(ir_node *node, env_t *env, set *repairs) * Make scalar replacement. * * @param envals The number of scalars. - * @parm repairs A set, that contains all blocks, that have a link, and all Phis, that + * @param repairs A set, that contains all blocks, that have a link, and all Phis, that * have copies to repair. * @param modes A flexible array, containing all the modes of * the value numbers. @@ -879,6 +875,7 @@ void find_scalar_replacements(ir_graph *irg) /* Call algorithm that computes the out edges */ compute_outs(irg); + /* Call algorithm that computes the loop information */ construct_backedges(irg); @@ -923,7 +920,7 @@ void find_scalar_replacements(ir_graph *irg) else if(is_atomic_type(ent_type)) printf("<<<<<<