From: Sebastian Hack Date: Wed, 19 Jan 2005 13:45:03 +0000 (+0000) Subject: Renamed copy_node to firm_copy_node X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=9e6d3b124e077fae5d6f1d1a59804a830fe7f93b;p=libfirm Renamed copy_node to firm_copy_node [r4950] --- diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index f19c7724f..315da6b76 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -210,7 +210,8 @@ static INLINE void new_backedge_info(ir_node *n) { * * Note: Also used for loop unrolling. */ -void copy_node (ir_node *n, void *env) { +static void +firm_copy_node (ir_node *n, void *env) { ir_node *nn, *block; int new_arity; opcode op = get_irn_opcode(n); @@ -384,7 +385,7 @@ copy_graph (int copy_node_nr) { set_new_node(om, nm); /* copy the live nodes */ - irg_walk(get_nodes_block(oe), copy_node, copy_preds, (void *)copy_node_nr); + irg_walk(get_nodes_block(oe), firm_copy_node, copy_preds, (void *)copy_node_nr); /* copy_preds for the end node ... */ set_nodes_block(ne, get_new_node(get_nodes_block(oe))); @@ -398,7 +399,7 @@ copy_graph (int copy_node_nr) { (get_irn_visited(ka) < get_irg_visited(current_ir_graph))) { /* We must keep the block alive and copy everything reachable */ set_irg_visited(current_ir_graph, get_irg_visited(current_ir_graph)-1); - irg_walk(ka, copy_node, copy_preds, (void *)copy_node_nr); + irg_walk(ka, firm_copy_node, copy_preds, (void *)copy_node_nr); add_End_keepalive(ne, get_new_node(ka)); } } @@ -411,7 +412,7 @@ copy_graph (int copy_node_nr) { if (get_irn_visited(ka) < get_irg_visited(current_ir_graph)) { /* We didn't copy the Phi yet. */ set_irg_visited(current_ir_graph, get_irg_visited(current_ir_graph)-1); - irg_walk(ka, copy_node, copy_preds, (void *)copy_node_nr); + irg_walk(ka, firm_copy_node, copy_preds, (void *)copy_node_nr); } add_End_keepalive(ne, get_new_node(ka)); } @@ -456,19 +457,19 @@ copy_graph_env (int copy_node_nr) { free_End(old_end); set_irg_end_block (current_ir_graph, get_new_node(get_irg_end_block(current_ir_graph))); if (get_irn_link(get_irg_frame(current_ir_graph)) == NULL) { - copy_node (get_irg_frame(current_ir_graph), (void *)copy_node_nr); + firm_copy_node (get_irg_frame(current_ir_graph), (void *)copy_node_nr); copy_preds(get_irg_frame(current_ir_graph), NULL); } if (get_irn_link(get_irg_globals(current_ir_graph)) == NULL) { - copy_node (get_irg_globals(current_ir_graph), (void *)copy_node_nr); + firm_copy_node (get_irg_globals(current_ir_graph), (void *)copy_node_nr); copy_preds(get_irg_globals(current_ir_graph), NULL); } if (get_irn_link(get_irg_initial_mem(current_ir_graph)) == NULL) { - copy_node (get_irg_initial_mem(current_ir_graph), (void *)copy_node_nr); + firm_copy_node (get_irg_initial_mem(current_ir_graph), (void *)copy_node_nr); copy_preds(get_irg_initial_mem(current_ir_graph), NULL); } if (get_irn_link(get_irg_args(current_ir_graph)) == NULL) { - copy_node (get_irg_args(current_ir_graph), (void *)copy_node_nr); + firm_copy_node (get_irg_args(current_ir_graph), (void *)copy_node_nr); copy_preds(get_irg_args(current_ir_graph), NULL); } set_irg_start (current_ir_graph, get_new_node(get_irg_start(current_ir_graph))); @@ -481,13 +482,13 @@ copy_graph_env (int copy_node_nr) { set_irg_args (current_ir_graph, get_new_node(get_irg_args(current_ir_graph))); if (get_irn_link(get_irg_bad(current_ir_graph)) == NULL) { - copy_node(get_irg_bad(current_ir_graph), (void *)copy_node_nr); + firm_copy_node(get_irg_bad(current_ir_graph), (void *)copy_node_nr); copy_preds(get_irg_bad(current_ir_graph), NULL); } set_irg_bad(current_ir_graph, get_new_node(get_irg_bad(current_ir_graph))); if (get_irn_link(get_irg_no_mem(current_ir_graph)) == NULL) { - copy_node(get_irg_no_mem(current_ir_graph), (void *)copy_node_nr); + firm_copy_node(get_irg_no_mem(current_ir_graph), (void *)copy_node_nr); copy_preds(get_irg_no_mem(current_ir_graph), NULL); } set_irg_no_mem(current_ir_graph, get_new_node(get_irg_no_mem(current_ir_graph))); @@ -670,7 +671,7 @@ void remove_bad_predecessors(ir_graph *irg) { * Copy node for inlineing. Updates attributes that change when * inlineing but not for dead node elimination. * - * Copies the node by calling copy_node and then updates the entity if + * Copies the node by calling firm_copy_node and then updates the entity if * it's a local one. env must be a pointer of the frame type of the * inlined procedure. The new entities must be in the link field of * the entities. @@ -680,7 +681,7 @@ copy_node_inline (ir_node *n, void *env) { ir_node *new; type *frame_tp = (type *)env; - copy_node(n, NULL); + firm_copy_node(n, NULL); if (get_irn_op(n) == op_Sel) { new = get_new_node (n); assert(get_irn_op(new) == op_Sel); @@ -919,7 +920,7 @@ int inline_method(ir_node *call, ir_graph *called_graph) { add_End_keepalive(get_irg_end(current_ir_graph), get_irn_n(end, i)); /* The new end node will die. We need not free as the in array is on the obstack: - copy_node only generated 'D' arrays. */ + firm_copy_node only generated 'D' arrays. */ /* -- Replace Return nodes by Jump nodes. -- */ n_ret = 0; diff --git a/ir/ir/irgopt_t.h b/ir/ir/irgopt_t.h index cadc1d046..e2446f978 100644 --- a/ir/ir/irgopt_t.h +++ b/ir/ir/irgopt_t.h @@ -1,2 +1,10 @@ +/** + * Internal irgopt functions. + */ -void copy_node (ir_node *n, void *env); +#ifndef _IRGOPT_T_H +#define _IRGOPT_T_H + +void firm_copy_node (ir_node *n, void *env); + +#endif