libFirm

Choose a value based on control flow. More...

Functions

ir_nodenew_rd_Phi_loop (dbg_info *db, ir_node *block, int arity, ir_node *in[])
 Constructor for memory Phi with keep-alive edge. More...
 
ir_nodenew_r_Phi_loop (ir_node *block, int arity, ir_node *in[])
 Constructor for memory Phi with keep-alive edge. More...
 
ir_nodenew_d_Phi_loop (dbg_info *db, int arity, ir_node *in[])
 Constructor for memory Phi with keep-alive edge. More...
 
ir_nodenew_Phi_loop (int arity, ir_node *in[])
 Constructor for memory Phi with keep-alive edge. More...
 
ir_nodeget_Phi_next (const ir_node *phi)
 Returns the next element of a block phi list. More...
 
void set_Phi_next (ir_node *phi, ir_node *next)
 Sets the next link of a block Phi list. More...
 
ir_nodenew_rd_Phi (dbg_info *dbgi, ir_node *block, int arity, ir_node *const *in, ir_mode *mode)
 Construct a Phi node. More...
 
ir_nodenew_r_Phi (ir_node *block, int arity, ir_node *const *in, ir_mode *mode)
 Construct a Phi node. More...
 
ir_nodenew_d_Phi (dbg_info *dbgi, int arity, ir_node *const *in, ir_mode *mode)
 Construct a Phi node. More...
 
ir_nodenew_Phi (int arity, ir_node *const *in, ir_mode *mode)
 Construct a Phi node. More...
 
int is_Phi (const ir_node *node)
 Test if node is a Phi. More...
 
int get_Phi_n_preds (ir_node const *node)
 Get the number of Phi preds. More...
 
ir_nodeget_Phi_pred (ir_node const *node, int pos)
 Get the Phi pred with index pos. More...
 
void set_Phi_pred (ir_node *node, int pos, ir_node *pred)
 Set the Phi pred with index pos. More...
 
ir_node ** get_Phi_pred_arr (ir_node *node)
 Get an array of all Phi preds. More...
 
int get_Phi_loop (const ir_node *node)
 Returns loop attribute of a Phi node. More...
 
void set_Phi_loop (ir_node *node, int loop)
 Sets loop attribute of a Phi node. More...
 
ir_opget_op_Phi (void)
 Returns opcode for Phi nodes. More...
 

Variables

ir_opop_Phi
 Phi opcode. More...
 

Detailed Description

Choose a value based on control flow.

A phi node has 1 input for each predecessor of its block. If a block is entered from its nth predecessor all phi nodes produce their nth input as result.

Function Documentation

ir_op* get_op_Phi ( void  )

Returns opcode for Phi nodes.

Definition at line 2039 of file gen_irnode.c.

References op_Phi.

int get_Phi_loop ( const ir_node node)

Returns loop attribute of a Phi node.

Definition at line 3355 of file gen_irnode.c.

int get_Phi_n_preds ( ir_node const *  node)

Get the number of Phi preds.

Definition at line 2019 of file gen_irnode.c.

ir_node* get_Phi_next ( const ir_node phi)

Returns the next element of a block phi list.

ir_node* get_Phi_pred ( ir_node const *  node,
int  pos 
)

Get the Phi pred with index pos.

Definition at line 2024 of file gen_irnode.c.

ir_node** get_Phi_pred_arr ( ir_node node)

Get an array of all Phi preds.

Definition at line 2034 of file gen_irnode.c.

References op_Phi.

int is_Phi ( const ir_node node)

Test if node is a Phi.

Returns
1 if the node is a Phi node, 0 otherwise

Definition at line 3350 of file gen_irnode.c.

ir_node* new_d_Phi ( dbg_info dbgi,
int  arity,
ir_node *const *  in,
ir_mode mode 
)

Construct a Phi node.

Parameters
dbgiA pointer to debug information.
aritysize of additional inputs array
inadditional inputs
modemode of the operations result

Definition at line 2007 of file gen_irnode.c.

References current_ir_graph, get_cur_block(), IR_GRAPH_CONSTRAINT_CONSTRUCTION, irg_is_constrained(), and new_rd_Phi().

Referenced by new_Phi().

ir_node* new_d_Phi_loop ( dbg_info db,
int  arity,
ir_node in[] 
)

Constructor for memory Phi with keep-alive edge.

ir_node* new_Phi ( int  arity,
ir_node *const *  in,
ir_mode mode 
)

Construct a Phi node.

Parameters
aritysize of additional inputs array
inadditional inputs
modemode of the operations result

Definition at line 2014 of file gen_irnode.c.

References new_d_Phi().

ir_node* new_Phi_loop ( int  arity,
ir_node in[] 
)

Constructor for memory Phi with keep-alive edge.

ir_node* new_r_Phi ( ir_node block,
int  arity,
ir_node *const *  in,
ir_mode mode 
)

Construct a Phi node.

Parameters
blockThe IR block the node belongs to.
aritysize of additional inputs array
inadditional inputs
modemode of the operations result

Definition at line 2002 of file gen_irnode.c.

References new_rd_Phi().

ir_node* new_r_Phi_loop ( ir_node block,
int  arity,
ir_node in[] 
)

Constructor for memory Phi with keep-alive edge.

ir_node* new_rd_Phi ( dbg_info dbgi,
ir_node block,
int  arity,
ir_node *const *  in,
ir_mode mode 
)

Construct a Phi node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
aritysize of additional inputs array
inadditional inputs
modemode of the operations result

Definition at line 1986 of file gen_irnode.c.

References get_irn_irg(), new_ir_node(), op_Phi, optimize_node(), and verify_new_node().

Referenced by new_d_Phi(), and new_r_Phi().

ir_node* new_rd_Phi_loop ( dbg_info db,
ir_node block,
int  arity,
ir_node in[] 
)

Constructor for memory Phi with keep-alive edge.

void set_Phi_loop ( ir_node node,
int  loop 
)

Sets loop attribute of a Phi node.

Definition at line 3360 of file gen_irnode.c.

void set_Phi_next ( ir_node phi,
ir_node next 
)

Sets the next link of a block Phi list.

void set_Phi_pred ( ir_node node,
int  pos,
ir_node pred 
)

Set the Phi pred with index pos.

Definition at line 2029 of file gen_irnode.c.

Variable Documentation

ir_op* op_Phi

Phi opcode.

Definition at line 2990 of file nodes.h.

Referenced by get_op_Phi(), get_Phi_pred_arr(), new_rd_Phi(), and set_typeconst_type().