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

Add del_Sync_n().

[r19033]
parent a0a72b17
......@@ -174,6 +174,8 @@ void set_irn_n(ir_node *node, int n, ir_node *in);
* @returns the number of the new input
*/
int add_irn_n(ir_node *node, ir_node *in);
/* Remove predecessor i from Sync n */
void del_Sync_n(ir_node *n, int i);
/* Sets the mode struct of node. */
void set_irn_mode(ir_node *node, ir_mode *mode);
/** Gets the mode struct of a node. */
......
......@@ -325,6 +325,15 @@ int add_irn_n(ir_node *node, ir_node *in) {
return pos;
}
void del_Sync_n(ir_node *n, int i)
{
int arity = get_Sync_n_preds(n);
ir_node *last_pred = get_Sync_pred(n, arity - 1);
set_Sync_pred(n, i, last_pred);
edges_notify_edge(n, arity - 1, NULL, last_pred, get_irn_irg(n));
ARR_SHRINKLEN(get_irn_in(n), arity);
}
int (get_irn_deps)(const ir_node *node) {
return _get_irn_deps(node);
}
......
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