summaryrefslogtreecommitdiffhomepage
path: root/ir/common
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-12-31 07:59:39 +0100
committerMatthias Braun <matze@braunis.de>2014-12-31 07:59:44 +0100
commit708440ca2e9d5576fb918b3709abd17de4769365 (patch)
treed1a2b1400aecebed39b9d9f3e6f3b49753778d99 /ir/common
parentc9c9e3345e798393d73afb4efc9e6aba2d482071 (diff)
move questionable copy_irn_to_irg() function to its only user
Diffstat (limited to 'ir/common')
-rw-r--r--ir/common/irtools.c59
-rw-r--r--ir/common/irtools.h14
2 files changed, 0 insertions, 73 deletions
diff --git a/ir/common/irtools.c b/ir/common/irtools.c
index d927213..dbe35f2 100644
--- a/ir/common/irtools.c
+++ b/ir/common/irtools.c
@@ -48,65 +48,6 @@ void firm_collect_block_phis(ir_node *node, void *env)
add_Block_phi(get_nodes_block(node), node);
}
-void copy_irn_to_irg(ir_node *n, ir_graph *irg)
-{
- /* do not copy standard nodes */
- ir_node *nn = NULL;
- switch (get_irn_opcode(n)) {
- case iro_NoMem:
- nn = get_irg_no_mem(irg);
- break;
-
- case iro_Block: {
- ir_graph *old_irg = get_irn_irg(n);
- if (n == get_irg_start_block(old_irg))
- nn = get_irg_start_block(irg);
- else if (n == get_irg_end_block(old_irg))
- nn = get_irg_end_block(irg);
- break;
- }
-
- case iro_Start:
- nn = get_irg_start(irg);
- break;
-
- case iro_End:
- nn = get_irg_end(irg);
- break;
-
- case iro_Proj: {
- ir_graph *old_irg = get_irn_irg(n);
- if (n == get_irg_frame(old_irg))
- nn = get_irg_frame(irg);
- else if (n == get_irg_initial_mem(old_irg))
- nn = get_irg_initial_mem(irg);
- else if (n == get_irg_args(old_irg))
- nn = get_irg_args(irg);
- break;
- }
- }
-
- if (nn) {
- set_irn_link(n, nn);
- return;
- }
-
- nn = new_ir_node(get_irn_dbg_info(n),
- irg,
- NULL, /* no block yet, will be set later */
- get_irn_op(n),
- get_irn_mode(n),
- get_irn_arity(n),
- get_irn_in(n) + 1);
-
-
- /* Copy the attributes. These might point to additional data. If this
- was allocated on the old obstack the pointers now are dangling. This
- frees e.g. the memory of the graph_arr allocated in new_immBlock. */
- copy_node_attr(irg, n, nn);
- set_irn_link(n, nn);
-}
-
ir_node *irn_copy_into_irg(const ir_node *node, ir_graph *irg)
{
ir_op *op = get_irn_op(node);
diff --git a/ir/common/irtools.h b/ir/common/irtools.h
index d5735b6..4cb4593 100644
--- a/ir/common/irtools.h
+++ b/ir/common/irtools.h
@@ -79,18 +79,4 @@ ir_node *irn_copy_into_irg(const ir_node *node, ir_graph *irg);
*/
void irn_rewire_inputs(ir_node *node);
-/**
- * @deprecated
- * Copies a node to a new irg. The Ins of the new node point to
- * the predecessors on the old irg. n->link points to the new node.
- *
- * @param n The node to be copied
- * @param irg the new irg
- *
- * Does NOT copy standard nodes like Start, End etc that are fixed
- * in an irg. Instead, the corresponding nodes of the new irg are returned.
- * Note further, that the new nodes have no block.
- */
-void copy_irn_to_irg(ir_node *n, ir_graph *irg);
-
#endif