libFirm

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

◆ cond_jmp_predicate

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 212 of file firm_types.h.

◆ n_Cond

enum n_Cond

Input numbers for Cond node.

Enumerator
n_Cond_selector 

condition parameter

n_Cond_max 

Definition at line 1197 of file nodes.h.

◆ pn_Cond

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 1205 of file nodes.h.

Function Documentation

◆ get_Cond_jmp_pred()

cond_jmp_predicate get_Cond_jmp_pred ( const ir_node node)

Returns jmp_pred attribute of a Cond node.

◆ get_Cond_selector()

ir_node* get_Cond_selector ( const ir_node node)

Returns selector input of a Cond node.

◆ get_op_Cond()

ir_op* get_op_Cond ( void  )

Returns opcode for Cond nodes.

◆ is_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

◆ new_Cond()

ir_node* new_Cond ( ir_node irn_selector)

Construct a Cond node.

Parameters
irn_selectorselector

◆ 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

◆ new_r_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

◆ 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

◆ set_Cond_jmp_pred()

void set_Cond_jmp_pred ( ir_node node,
cond_jmp_predicate  jmp_pred 
)

Sets jmp_pred attribute of a Cond node.

◆ set_Cond_selector()

void set_Cond_selector ( ir_node node,
ir_node selector 
)

Sets selector input of a Cond node.

Variable Documentation

◆ op_Cond

ir_op* op_Cond

Cond opcode.

Definition at line 1259 of file nodes.h.