1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
4 ** Authors: Martin Trapp, Christian Schaefer
6 ** irgmod: ir graph modification
12 /* Turns a node into a "useless" Tuple. The Tuple just forms a tuple
14 This is useful if a node returning a tuple is removed, but the Projs
15 extracting values from the tuple are not available. */
17 turn_into_tuple (ir_node *node, int arity)
20 set_irn_op(node, op_Tuple);
21 if (get_irn_arity(node) == arity) {
24 /* allocate new array, remove old one. */
25 /* !!!??? free old in_array */
26 node->in = NEW_ARR_D (ir_node *, current_ir_graph->obst, arity+1);
30 /* Insert irnode `new' in place of irnode `old'
31 Since `new' may be bigger than `old' replace `old'
32 by an op_Id which is smaller than everything */
34 exchange (ir_node *old, ir_node *new)
36 ir_node *block = old->in[0];
39 old->in = NEW_ARR_D (ir_node *, current_ir_graph->obst, 2);