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

Computes the address of an array element from the array base pointer and an index. More...

Enumerations

enum  n_Sel { n_Sel_ptr, n_Sel_index, n_Sel_max = n_Sel_index }
 Input numbers for Sel node. More...
 

Functions

ir_nodenew_rd_Sel (dbg_info *dbgi, ir_node *block, ir_node *irn_ptr, ir_node *irn_index, ir_type *type)
 Construct a Sel node. More...
 
ir_nodenew_r_Sel (ir_node *block, ir_node *irn_ptr, ir_node *irn_index, ir_type *type)
 Construct a Sel node. More...
 
ir_nodenew_d_Sel (dbg_info *dbgi, ir_node *irn_ptr, ir_node *irn_index, ir_type *type)
 Construct a Sel node. More...
 
ir_nodenew_Sel (ir_node *irn_ptr, ir_node *irn_index, ir_type *type)
 Construct a Sel node. More...
 
int is_Sel (const ir_node *node)
 Test if node is a Sel. More...
 
ir_nodeget_Sel_ptr (const ir_node *node)
 Returns ptr input of a Sel node. More...
 
void set_Sel_ptr (ir_node *node, ir_node *ptr)
 Sets ptr input of a Sel node. More...
 
ir_nodeget_Sel_index (const ir_node *node)
 Returns index input of a Sel node. More...
 
void set_Sel_index (ir_node *node, ir_node *index)
 Sets index input of a Sel node. More...
 
ir_typeget_Sel_type (const ir_node *node)
 Returns type attribute of a Sel node. More...
 
void set_Sel_type (ir_node *node, ir_type *type)
 Sets type attribute of a Sel node. More...
 
ir_opget_op_Sel (void)
 Returns opcode for Sel nodes. More...
 

Variables

ir_opop_Sel
 Sel opcode. More...
 

Detailed Description

Computes the address of an array element from the array base pointer and an index.

A Sel node must only produce a NULL pointer if the ptr input is NULL.

Enumeration Type Documentation

enum n_Sel

Input numbers for Sel node.

Enumerator
n_Sel_ptr 

pointer to array to select from

n_Sel_index 

index to select

n_Sel_max 

Definition at line 3363 of file nodes.h.

Function Documentation

ir_op* get_op_Sel ( void  )

Returns opcode for Sel nodes.

Definition at line 2320 of file gen_irnode.c.

References op_Sel.

ir_node* get_Sel_index ( const ir_node node)

Returns index input of a Sel node.

Definition at line 2310 of file gen_irnode.c.

ir_node* get_Sel_ptr ( const ir_node node)

Returns ptr input of a Sel node.

Definition at line 2300 of file gen_irnode.c.

ir_type* get_Sel_type ( const ir_node node)

Returns type attribute of a Sel node.

Definition at line 3399 of file gen_irnode.c.

int is_Sel ( const ir_node node)

Test if node is a Sel.

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

Definition at line 3394 of file gen_irnode.c.

ir_node* new_d_Sel ( dbg_info dbgi,
ir_node irn_ptr,
ir_node irn_index,
ir_type type 
)

Construct a Sel node.

Parameters
dbgiA pointer to debug information.
irn_ptrptr
irn_indexindex
typearray type

Definition at line 2288 of file gen_irnode.c.

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

Referenced by new_Sel().

ir_node* new_r_Sel ( ir_node block,
ir_node irn_ptr,
ir_node irn_index,
ir_type type 
)

Construct a Sel node.

Parameters
blockThe IR block the node belongs to.
irn_ptrptr
irn_indexindex
typearray type

Definition at line 2283 of file gen_irnode.c.

References new_rd_Sel().

ir_node* new_rd_Sel ( dbg_info dbgi,
ir_node block,
ir_node irn_ptr,
ir_node irn_index,
ir_type type 
)

Construct a Sel node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_ptrptr
irn_indexindex
typearray type

Definition at line 2266 of file gen_irnode.c.

References get_irn_irg(), mode_P, new_ir_node(), op_Sel, optimize_node(), and verify_new_node().

Referenced by new_d_Sel(), and new_r_Sel().

ir_node* new_Sel ( ir_node irn_ptr,
ir_node irn_index,
ir_type type 
)

Construct a Sel node.

Parameters
irn_ptrptr
irn_indexindex
typearray type

Definition at line 2295 of file gen_irnode.c.

References new_d_Sel().

void set_Sel_index ( ir_node node,
ir_node index 
)

Sets index input of a Sel node.

Definition at line 2315 of file gen_irnode.c.

void set_Sel_ptr ( ir_node node,
ir_node ptr 
)

Sets ptr input of a Sel node.

Definition at line 2305 of file gen_irnode.c.

void set_Sel_type ( ir_node node,
ir_type type 
)

Sets type attribute of a Sel node.

Definition at line 3404 of file gen_irnode.c.

Variable Documentation

ir_op* op_Sel

Sel opcode.

Definition at line 3429 of file nodes.h.

Referenced by get_op_Sel(), and new_rd_Sel().