libFirm
Sel node

Computes the address of a entity of a compound type given the base address of an instance of the compound type. More...

Enumerations

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

Functions

ir_nodenew_rd_simpleSel (dbg_info *db, ir_node *block, ir_node *store, ir_node *objptr, ir_entity *ent)
 Constructor for a simpleSel node.
ir_nodenew_r_simpleSel (ir_node *block, ir_node *store, ir_node *objptr, ir_entity *ent)
 Constructor for a simpleSel node.
ir_nodenew_d_simpleSel (dbg_info *db, ir_node *store, ir_node *objptr, ir_entity *ent)
 Constructor for a simpleSel node.
ir_nodenew_simpleSel (ir_node *store, ir_node *objptr, ir_entity *ent)
 Constructor for a simpelSel node.
ir_node ** get_Sel_index_arr (ir_node *node)
 Returns index inputs of Sel node node as array.
int get_Sel_n_indexs (const ir_node *node)
 Returns number of index inputs of Sel node node.
ir_nodeget_Sel_index (const ir_node *node, int pos)
 Returns value of index input pos of Sel node node.
void set_Sel_index (ir_node *node, int pos, ir_node *index)
 Sets index as index input pos of Sel node node.
ir_nodenew_rd_Sel (dbg_info *dbgi, ir_node *block, ir_node *irn_mem, ir_node *irn_ptr, int arity, ir_node *const *in, ir_entity *entity)
 Construct a Sel node.
ir_nodenew_r_Sel (ir_node *block, ir_node *irn_mem, ir_node *irn_ptr, int arity, ir_node *const *in, ir_entity *entity)
 Construct a Sel node.
ir_nodenew_d_Sel (dbg_info *dbgi, ir_node *irn_mem, ir_node *irn_ptr, int arity, ir_node *const *in, ir_entity *entity)
 Construct a Sel node.
ir_nodenew_Sel (ir_node *irn_mem, ir_node *irn_ptr, int arity, ir_node *const *in, ir_entity *entity)
 Construct a Sel node.
int is_Sel (const ir_node *node)
 Test if node is a Sel.
ir_nodeget_Sel_mem (const ir_node *node)
 Returns mem input of a Sel node.
void set_Sel_mem (ir_node *node, ir_node *mem)
 Sets mem input of a Sel node.
ir_nodeget_Sel_ptr (const ir_node *node)
 Returns ptr input of a Sel node.
void set_Sel_ptr (ir_node *node, ir_node *ptr)
 Sets ptr input of a Sel node.
ir_entityget_Sel_entity (const ir_node *node)
 Returns entity attribute of a Sel node.
void set_Sel_entity (ir_node *node, ir_entity *entity)
 Sets entity attribute of a Sel node.
ir_opget_op_Sel (void)
 Returns opcode for Sel nodes.

Variables

ir_opop_Sel
 Sel opcode.

Detailed Description

Computes the address of a entity of a compound type given the base address of an instance of the compound type.

Optimisations assume that a Sel node can only produce a NULL pointer if the ptr input was NULL.

Enumeration Type Documentation

enum n_Sel

Input numbers for Sel node.

Definition at line 3146 of file nodeops.h.

Function Documentation

ir_op* get_op_Sel ( void  )

Returns opcode for Sel nodes.

ir_entity* get_Sel_entity ( const ir_node node)

Returns entity attribute of a Sel node.

ir_node* get_Sel_index ( const ir_node node,
int  pos 
)

Returns value of index input pos of Sel node node.

ir_node** get_Sel_index_arr ( ir_node node)

Returns index inputs of Sel node node as array.

ir_node* get_Sel_mem ( const ir_node node)

Returns mem input of a Sel node.

int get_Sel_n_indexs ( const ir_node node)

Returns number of index inputs of Sel node node.

ir_node* get_Sel_ptr ( const ir_node node)

Returns ptr input of a Sel node.

int is_Sel ( const ir_node node)

Test if node is a Sel.

Returns
1 if the node is a Sel node, 0 otherwise
ir_node* new_d_Sel ( dbg_info dbgi,
ir_node irn_mem,
ir_node irn_ptr,
int  arity,
ir_node *const *  in,
ir_entity entity 
)

Construct a Sel node.

Parameters
dbgiA pointer to debug information.
irn_memmemory dependency
irn_ptrpointer to object to select from
aritysize of additional inputs array
inadditional inputs
entityentity which is selected
ir_node* new_d_simpleSel ( dbg_info db,
ir_node store,
ir_node objptr,
ir_entity ent 
)

Constructor for a simpleSel node.

This is a shortcut for the new_d_Sel() constructor. To be used for Sel nodes that do not select from an array, i.e., have no index inputs. It adds the two parameters 0, NULL.

Parameters
*dbA pointer for debug information.
*storeThe memory in which the object the entity should be selected from is allocated.
*objptrThe object from that the Sel operation selects a single attribute out.
*entThe entity to select.
ir_node* new_r_Sel ( ir_node block,
ir_node irn_mem,
ir_node irn_ptr,
int  arity,
ir_node *const *  in,
ir_entity entity 
)

Construct a Sel node.

Parameters
blockThe IR block the node belongs to.
irn_memmemory dependency
irn_ptrpointer to object to select from
aritysize of additional inputs array
inadditional inputs
entityentity which is selected
ir_node* new_r_simpleSel ( ir_node block,
ir_node store,
ir_node objptr,
ir_entity ent 
)

Constructor for a simpleSel node.

This is a shortcut for the new_d_Sel() constructor. To be used for Sel nodes that do not select from an array, i.e., have no index inputs. It adds the two parameters 0, NULL.

Parameters
*blockThe IR block the node belongs to.
*storeThe memory in which the object the entity should be selected from is allocated.
*objptrThe object from that the Sel operation selects a single attribute out.
*entThe entity to select.
ir_node* new_rd_Sel ( dbg_info dbgi,
ir_node block,
ir_node irn_mem,
ir_node irn_ptr,
int  arity,
ir_node *const *  in,
ir_entity entity 
)

Construct a Sel node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_memmemory dependency
irn_ptrpointer to object to select from
aritysize of additional inputs array
inadditional inputs
entityentity which is selected
ir_node* new_rd_simpleSel ( dbg_info db,
ir_node block,
ir_node store,
ir_node objptr,
ir_entity ent 
)

Constructor for a simpleSel node.

This is a shortcut for the new_rd_Sel() constructor. To be used for Sel nodes that do not select from an array, i.e., have no index inputs. It adds the two parameters 0, NULL.

Parameters
*dbA pointer for debug information.
*blockThe IR block the node belongs to.
*storeThe memory in which the object the entity should be selected from is allocated.
*objptrThe object from that the Sel operation selects a single attribute out.
*entThe entity to select.
ir_node* new_Sel ( ir_node irn_mem,
ir_node irn_ptr,
int  arity,
ir_node *const *  in,
ir_entity entity 
)

Construct a Sel node.

Parameters
irn_memmemory dependency
irn_ptrpointer to object to select from
aritysize of additional inputs array
inadditional inputs
entityentity which is selected
ir_node* new_simpleSel ( ir_node store,
ir_node objptr,
ir_entity ent 
)

Constructor for a simpelSel node.

This is a shortcut for the new_Sel() constructor. To be used for Sel nodes that do not select from an array, i.e., have no index inputs. It adds the two parameters 0, NULL.

Parameters
*storeThe memory in which the object the entity should be selected from is allocated.
*objptrThe object from that the Sel operation selects a single attribute out.
*entThe entity to select.
void set_Sel_entity ( ir_node node,
ir_entity entity 
)

Sets entity attribute of a Sel node.

void set_Sel_index ( ir_node node,
int  pos,
ir_node index 
)

Sets index as index input pos of Sel node node.

void set_Sel_mem ( ir_node node,
ir_node mem 
)

Sets mem input of a Sel node.

void set_Sel_ptr ( ir_node node,
ir_node ptr 
)

Sets ptr input of a Sel node.

Variable Documentation

ir_op* op_Sel

Sel opcode.

Definition at line 313 of file opcodes.h.