libFirm
Tuple node

Builds a Tuple from single values. More...

Functions

ir_node ** get_Tuple_preds_arr (ir_node *node)
 Returns all predecessors of Tuple node node as array.
int get_Tuple_n_preds (const ir_node *node)
 Returns number of predecessors of Tuple node node.
ir_nodeget_Tuple_pred (const ir_node *node, int pos)
 Returns predecessor number pos of Tuple node node.
void set_Tuple_pred (ir_node *node, int pos, ir_node *pred)
 Sets value pred as predecessor number pos of Tuple node node.
ir_nodenew_rd_Tuple (dbg_info *dbgi, ir_node *block, int arity, ir_node *const *in)
 Construct a Tuple node.
ir_nodenew_r_Tuple (ir_node *block, int arity, ir_node *const *in)
 Construct a Tuple node.
ir_nodenew_d_Tuple (dbg_info *dbgi, int arity, ir_node *const *in)
 Construct a Tuple node.
ir_nodenew_Tuple (int arity, ir_node *const *in)
 Construct a Tuple node.
int is_Tuple (const ir_node *node)
 Test if node is a Tuple.
ir_opget_op_Tuple (void)
 Returns opcode for Tuple nodes.

Variables

ir_opop_Tuple
 Tuple opcode.

Detailed Description

Builds a Tuple from single values.

This is needed to implement optimizations that remove a node that produced a tuple. The node can be replaced by the Tuple operation so that the following Proj nodes have not to be changed. (They are hard to find due to the implementation with pointers in only one direction.) The Tuple node is smaller than any other node, so that a node can be changed into a Tuple by just changing its opcode and giving it a new in array.

Function Documentation

ir_op* get_op_Tuple ( void  )

Returns opcode for Tuple nodes.

int get_Tuple_n_preds ( const ir_node node)

Returns number of predecessors of Tuple node node.

ir_node* get_Tuple_pred ( const ir_node node,
int  pos 
)

Returns predecessor number pos of Tuple node node.

ir_node** get_Tuple_preds_arr ( ir_node node)

Returns all predecessors of Tuple node node as array.

int is_Tuple ( const ir_node node)

Test if node is a Tuple.

Returns
1 if the node is a Tuple node, 0 otherwise
ir_node* new_d_Tuple ( dbg_info dbgi,
int  arity,
ir_node *const *  in 
)

Construct a Tuple node.

Parameters
dbgiA pointer to debug information.
aritysize of additional inputs array
inadditional inputs
ir_node* new_r_Tuple ( ir_node block,
int  arity,
ir_node *const *  in 
)

Construct a Tuple node.

Parameters
blockThe IR block the node belongs to.
aritysize of additional inputs array
inadditional inputs
ir_node* new_rd_Tuple ( dbg_info dbgi,
ir_node block,
int  arity,
ir_node *const *  in 
)

Construct a Tuple node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
aritysize of additional inputs array
inadditional inputs
ir_node* new_Tuple ( int  arity,
ir_node *const *  in 
)

Construct a Tuple node.

Parameters
aritysize of additional inputs array
inadditional inputs
void set_Tuple_pred ( ir_node node,
int  pos,
ir_node pred 
)

Sets value pred as predecessor number pos of Tuple node node.

Variable Documentation

ir_op* op_Tuple

Tuple opcode.

Definition at line 363 of file opcodes.h.