libFirm 1.20
Bound node

Performs a bounds-check: if lower <= index < upper then return index, otherwise throw an exception. More...

Enumerations

enum  n_Bound {
  n_Bound_mem, n_Bound_index, n_Bound_lower, n_Bound_upper,
  n_Bound_max = n_Bound_upper
}
 Input numbers for Bound node. More...
enum  pn_Bound {
  pn_Bound_M, pn_Bound_res, pn_Bound_X_regular, pn_Bound_X_except,
  pn_Bound_max = pn_Bound_X_except
}
 Projection numbers for result of Bound node (use for Proj nodes) More...

Functions

ir_nodenew_rd_Bound (dbg_info *dbgi, ir_node *block, ir_node *irn_mem, ir_node *irn_index, ir_node *irn_lower, ir_node *irn_upper)
 Construct a Bound node.
ir_nodenew_r_Bound (ir_node *block, ir_node *irn_mem, ir_node *irn_index, ir_node *irn_lower, ir_node *irn_upper)
 Construct a Bound node.
ir_nodenew_d_Bound (dbg_info *dbgi, ir_node *irn_mem, ir_node *irn_index, ir_node *irn_lower, ir_node *irn_upper)
 Construct a Bound node.
ir_nodenew_Bound (ir_node *irn_mem, ir_node *irn_index, ir_node *irn_lower, ir_node *irn_upper)
 Construct a Bound node.
int is_Bound (const ir_node *node)
 Test if node is a Bound.
ir_nodeget_Bound_mem (const ir_node *node)
 Returns mem input of a Bound node.
void set_Bound_mem (ir_node *node, ir_node *mem)
 Sets mem input of a Bound node.
ir_nodeget_Bound_index (const ir_node *node)
 Returns index input of a Bound node.
void set_Bound_index (ir_node *node, ir_node *index)
 Sets index input of a Bound node.
ir_nodeget_Bound_lower (const ir_node *node)
 Returns lower input of a Bound node.
void set_Bound_lower (ir_node *node, ir_node *lower)
 Sets lower input of a Bound node.
ir_nodeget_Bound_upper (const ir_node *node)
 Returns upper input of a Bound node.
void set_Bound_upper (ir_node *node, ir_node *upper)
 Sets upper input of a Bound node.
ir_opget_op_Bound (void)
 Returns opcode for Bound nodes.

Variables

ir_opop_Bound
 Bound opcode.

Detailed Description

Performs a bounds-check: if lower <= index < upper then return index, otherwise throw an exception.


Enumeration Type Documentation

enum n_Bound

Input numbers for Bound node.

Definition at line 522 of file nodeops.h.

enum pn_Bound

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

Enumerator:
pn_Bound_M 

memory result

pn_Bound_res 

the checked index

pn_Bound_X_regular 

control flow when no exception occurs

pn_Bound_X_except 

control flow when exception occured

Definition at line 534 of file nodeops.h.


Function Documentation

ir_node* get_Bound_index ( const ir_node node)

Returns index input of a Bound node.

ir_node* get_Bound_lower ( const ir_node node)

Returns lower input of a Bound node.

ir_node* get_Bound_mem ( const ir_node node)

Returns mem input of a Bound node.

ir_node* get_Bound_upper ( const ir_node node)

Returns upper input of a Bound node.

ir_op* get_op_Bound ( void  )

Returns opcode for Bound nodes.

int is_Bound ( const ir_node node)

Test if node is a Bound.

Returns:
1 if the node is a Bound node, 0 otherwise
ir_node* new_Bound ( ir_node irn_mem,
ir_node irn_index,
ir_node irn_lower,
ir_node irn_upper 
)

Construct a Bound node.

Parameters:
irn_memmemory dependency
irn_indexvalue to test
irn_lowerlower bound (inclusive)
irn_upperupper bound (exclusive)
ir_node* new_d_Bound ( dbg_info dbgi,
ir_node irn_mem,
ir_node irn_index,
ir_node irn_lower,
ir_node irn_upper 
)

Construct a Bound node.

Parameters:
dbgiA pointer to debug information.
irn_memmemory dependency
irn_indexvalue to test
irn_lowerlower bound (inclusive)
irn_upperupper bound (exclusive)
ir_node* new_r_Bound ( ir_node block,
ir_node irn_mem,
ir_node irn_index,
ir_node irn_lower,
ir_node irn_upper 
)

Construct a Bound node.

Parameters:
blockThe IR block the node belongs to.
irn_memmemory dependency
irn_indexvalue to test
irn_lowerlower bound (inclusive)
irn_upperupper bound (exclusive)
ir_node* new_rd_Bound ( dbg_info dbgi,
ir_node block,
ir_node irn_mem,
ir_node irn_index,
ir_node irn_lower,
ir_node irn_upper 
)

Construct a Bound node.

Parameters:
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_memmemory dependency
irn_indexvalue to test
irn_lowerlower bound (inclusive)
irn_upperupper bound (exclusive)
void set_Bound_index ( ir_node node,
ir_node index 
)

Sets index input of a Bound node.

void set_Bound_lower ( ir_node node,
ir_node lower 
)

Sets lower input of a Bound node.

void set_Bound_mem ( ir_node node,
ir_node mem 
)

Sets mem input of a Bound node.

void set_Bound_upper ( ir_node node,
ir_node upper 
)

Sets upper input of a Bound node.


Variable Documentation

Bound opcode.

Definition at line 134 of file opcodes.h.