Commit e626a762 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ir: Use add_irn_deps().

parent bd3e22c6
......@@ -77,7 +77,7 @@ FIRM_API void add_irn_dep(ir_node *node, ir_node *dep);
* @param tgt The node which should be enriched.
* @param src The node whose dependencies shall be copied.
*/
FIRM_API void add_irn_deps(ir_node *tgt, ir_node *src);
FIRM_API void add_irn_deps(ir_node *tgt, ir_node const *src);
/**
* Returns the number of dependency predecessors/edges of node @p node.
......
......@@ -121,10 +121,7 @@ ir_node *irn_copy_into_irg(const ir_node *node, ir_graph *irg)
copy_node_attr(irg, node, res);
/* duplicate dependency edges */
for (int i = 0, n_deps = get_irn_n_deps(node); i < n_deps; ++i) {
ir_node *dep = get_irn_dep(node, i);
add_irn_dep(res, dep);
}
add_irn_deps(res, node);
return res;
}
......
......@@ -296,7 +296,7 @@ void delete_irn_dep(ir_node *node, ir_node *dep)
}
}
void add_irn_deps(ir_node *tgt, ir_node *src)
void add_irn_deps(ir_node *const tgt, ir_node const *const src)
{
for (int i = 0, n = get_irn_n_deps(src); i < n; ++i)
add_irn_dep(tgt, get_irn_dep(src, i));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment