libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Cond node

Conditionally change control flow. More...

Enumerations

enum  cond_jmp_predicate { COND_JMP_PRED_NONE, COND_JMP_PRED_TRUE, COND_JMP_PRED_FALSE }
 A type to express conditional jump predictions. More...
 
enum  n_Cond { n_Cond_selector, n_Cond_max = n_Cond_selector }
 Input numbers for Cond node. More...
 
enum  pn_Cond { pn_Cond_false, pn_Cond_true, pn_Cond_max = pn_Cond_true }
 Projection numbers for result of Cond node (use for Proj nodes) More...
 

Functions

ir_nodenew_rd_Cond (dbg_info *dbgi, ir_node *block, ir_node *irn_selector)
 Construct a Cond node. More...
 
ir_nodenew_r_Cond (ir_node *block, ir_node *irn_selector)
 Construct a Cond node. More...
 
ir_nodenew_d_Cond (dbg_info *dbgi, ir_node *irn_selector)
 Construct a Cond node. More...
 
ir_nodenew_Cond (ir_node *irn_selector)
 Construct a Cond node. More...
 
int is_Cond (const ir_node *node)
 Test if node is a Cond. More...
 
ir_nodeget_Cond_selector (const ir_node *node)
 Returns selector input of a Cond node. More...
 
void set_Cond_selector (ir_node *node, ir_node *selector)
 Sets selector input of a Cond node. More...
 
cond_jmp_predicate get_Cond_jmp_pred (const ir_node *node)
 Returns jmp_pred attribute of a Cond node. More...
 
void set_Cond_jmp_pred (ir_node *node, cond_jmp_predicate jmp_pred)
 Sets jmp_pred attribute of a Cond node. More...
 
ir_opget_op_Cond (void)
 Returns opcode for Cond nodes. More...
 

Variables

ir_opop_Cond
 Cond opcode. More...
 

Detailed Description

Conditionally change control flow.

Enumeration Type Documentation

A type to express conditional jump predictions.

Enumerator
COND_JMP_PRED_NONE 

No jump prediction.

Default.

COND_JMP_PRED_TRUE 

The True case is predicted.

COND_JMP_PRED_FALSE 

The False case is predicted.

Definition at line 209 of file firm_types.h.

enum n_Cond

Input numbers for Cond node.

Enumerator
n_Cond_selector 

condition parameter

n_Cond_max 

Definition at line 1133 of file nodes.h.

enum pn_Cond

Projection numbers for result of Cond node (use for Proj nodes)

Enumerator
pn_Cond_false 

control flow if operand is "false"

pn_Cond_true 

control flow if operand is "true"

pn_Cond_max 

Definition at line 1141 of file nodes.h.

Function Documentation

cond_jmp_predicate get_Cond_jmp_pred ( const ir_node node)

Returns jmp_pred attribute of a Cond node.

Definition at line 3089 of file gen_irnode.c.

ir_node* get_Cond_selector ( const ir_node node)

Returns selector input of a Cond node.

Definition at line 783 of file gen_irnode.c.

ir_op* get_op_Cond ( void  )

Returns opcode for Cond nodes.

Definition at line 793 of file gen_irnode.c.

References op_Cond.

int is_Cond ( const ir_node node)

Test if node is a Cond.

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

Definition at line 3084 of file gen_irnode.c.

ir_node* new_Cond ( ir_node irn_selector)

Construct a Cond node.

Parameters
irn_selectorselector

Definition at line 778 of file gen_irnode.c.

References new_d_Cond().

ir_node* new_d_Cond ( dbg_info dbgi,
ir_node irn_selector 
)

Construct a Cond node.

Parameters
dbgiA pointer to debug information.
irn_selectorselector

Definition at line 771 of file gen_irnode.c.

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

Referenced by new_Cond().

ir_node* new_r_Cond ( ir_node block,
ir_node irn_selector 
)

Construct a Cond node.

Parameters
blockThe IR block the node belongs to.
irn_selectorselector

Definition at line 766 of file gen_irnode.c.

References new_rd_Cond().

ir_node* new_rd_Cond ( dbg_info dbgi,
ir_node block,
ir_node irn_selector 
)

Construct a Cond node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_selectorselector

Definition at line 750 of file gen_irnode.c.

References COND_JMP_PRED_NONE, get_irn_irg(), mode_T, new_ir_node(), op_Cond, optimize_node(), and verify_new_node().

Referenced by new_d_Cond(), and new_r_Cond().

void set_Cond_jmp_pred ( ir_node node,
cond_jmp_predicate  jmp_pred 
)

Sets jmp_pred attribute of a Cond node.

Definition at line 3094 of file gen_irnode.c.

void set_Cond_selector ( ir_node node,
ir_node selector 
)

Sets selector input of a Cond node.

Definition at line 788 of file gen_irnode.c.

Variable Documentation

ir_op* op_Cond

Cond opcode.

Definition at line 1195 of file nodes.h.

Referenced by get_op_Cond(), and new_rd_Cond().