libFirm
Store node

Stores a value into memory (heap or stack). More...

Enumerations

enum  n_Store { n_Store_mem, n_Store_ptr, n_Store_value, n_Store_max = n_Store_value }
 Input numbers for Store node. More...
 
enum  pn_Store { pn_Store_M, pn_Store_X_regular, pn_Store_X_except, pn_Store_max = pn_Store_X_except }
 Projection numbers for result of Store node (use for Proj nodes) More...
 

Functions

ir_nodenew_rd_Store (dbg_info *dbgi, ir_node *block, ir_node *irn_mem, ir_node *irn_ptr, ir_node *irn_value, ir_type *type, ir_cons_flags flags)
 Construct a Store node. More...
 
ir_nodenew_r_Store (ir_node *block, ir_node *irn_mem, ir_node *irn_ptr, ir_node *irn_value, ir_type *type, ir_cons_flags flags)
 Construct a Store node. More...
 
ir_nodenew_d_Store (dbg_info *dbgi, ir_node *irn_mem, ir_node *irn_ptr, ir_node *irn_value, ir_type *type, ir_cons_flags flags)
 Construct a Store node. More...
 
ir_nodenew_Store (ir_node *irn_mem, ir_node *irn_ptr, ir_node *irn_value, ir_type *type, ir_cons_flags flags)
 Construct a Store node. More...
 
int is_Store (const ir_node *node)
 Test if node is a Store. More...
 
ir_nodeget_Store_mem (const ir_node *node)
 Returns mem input of a Store node. More...
 
void set_Store_mem (ir_node *node, ir_node *mem)
 Sets mem input of a Store node. More...
 
ir_nodeget_Store_ptr (const ir_node *node)
 Returns ptr input of a Store node. More...
 
void set_Store_ptr (ir_node *node, ir_node *ptr)
 Sets ptr input of a Store node. More...
 
ir_nodeget_Store_value (const ir_node *node)
 Returns value input of a Store node. More...
 
void set_Store_value (ir_node *node, ir_node *value)
 Sets value input of a Store node. More...
 
ir_typeget_Store_type (const ir_node *node)
 Returns type attribute of a Store node. More...
 
void set_Store_type (ir_node *node, ir_type *type)
 Sets type attribute of a Store node. More...
 
ir_volatility get_Store_volatility (const ir_node *node)
 Returns volatility attribute of a Store node. More...
 
void set_Store_volatility (ir_node *node, ir_volatility volatility)
 Sets volatility attribute of a Store node. More...
 
ir_align get_Store_unaligned (const ir_node *node)
 Returns unaligned attribute of a Store node. More...
 
void set_Store_unaligned (ir_node *node, ir_align unaligned)
 Sets unaligned attribute of a Store node. More...
 
ir_opget_op_Store (void)
 Returns opcode for Store nodes. More...
 

Variables

ir_opop_Store
 Store opcode. More...
 

Detailed Description

Stores a value into memory (heap or stack).

Enumeration Type Documentation

enum n_Store

Input numbers for Store node.

Enumerator
n_Store_mem 

memory dependency

n_Store_ptr 

address to store to

n_Store_value 

value to store

n_Store_max 

Definition at line 3759 of file nodes.h.

enum pn_Store

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

Enumerator
pn_Store_M 

memory result

pn_Store_X_regular 

control flow when no exception occurs

pn_Store_X_except 

control flow when exception occured

pn_Store_max 

Definition at line 3769 of file nodes.h.

Function Documentation

ir_op* get_op_Store ( void  )

Returns opcode for Store nodes.

Definition at line 2640 of file gen_irnode.c.

References op_Store.

ir_node* get_Store_mem ( const ir_node node)

Returns mem input of a Store node.

Definition at line 2610 of file gen_irnode.c.

ir_node* get_Store_ptr ( const ir_node node)

Returns ptr input of a Store node.

Definition at line 2620 of file gen_irnode.c.

ir_type* get_Store_type ( const ir_node node)

Returns type attribute of a Store node.

Definition at line 3450 of file gen_irnode.c.

ir_align get_Store_unaligned ( const ir_node node)

Returns unaligned attribute of a Store node.

Definition at line 3470 of file gen_irnode.c.

ir_node* get_Store_value ( const ir_node node)

Returns value input of a Store node.

Definition at line 2630 of file gen_irnode.c.

ir_volatility get_Store_volatility ( const ir_node node)

Returns volatility attribute of a Store node.

Definition at line 3460 of file gen_irnode.c.

int is_Store ( const ir_node node)

Test if node is a Store.

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

Definition at line 3445 of file gen_irnode.c.

ir_node* new_d_Store ( dbg_info dbgi,
ir_node irn_mem,
ir_node irn_ptr,
ir_node irn_value,
ir_type type,
ir_cons_flags  flags 
)

Construct a Store node.

Parameters
dbgiA pointer to debug information.
irn_memmem
irn_ptrptr
irn_valuevalue
typeThe type of the object which is stored at ptr (need not match with value's type)
flagsspecifies alignment, volatility and pin state

Definition at line 2598 of file gen_irnode.c.

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

Referenced by new_Store().

ir_node* new_r_Store ( ir_node block,
ir_node irn_mem,
ir_node irn_ptr,
ir_node irn_value,
ir_type type,
ir_cons_flags  flags 
)

Construct a Store node.

Parameters
blockThe IR block the node belongs to.
irn_memmem
irn_ptrptr
irn_valuevalue
typeThe type of the object which is stored at ptr (need not match with value's type)
flagsspecifies alignment, volatility and pin state

Definition at line 2593 of file gen_irnode.c.

References new_rd_Store().

ir_node* new_rd_Store ( dbg_info dbgi,
ir_node block,
ir_node irn_mem,
ir_node irn_ptr,
ir_node irn_value,
ir_type type,
ir_cons_flags  flags 
)

Construct a Store node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_memmem
irn_ptrptr
irn_valuevalue
typeThe type of the object which is stored at ptr (need not match with value's type)
flagsspecifies alignment, volatility and pin state

Definition at line 2571 of file gen_irnode.c.

References cons_floats, cons_throws_exception, cons_unaligned, cons_volatile, get_irn_irg(), mode_T, new_ir_node(), op_pin_state_floats, op_pin_state_pinned, op_Store, optimize_node(), and verify_new_node().

Referenced by new_d_Store(), and new_r_Store().

ir_node* new_Store ( ir_node irn_mem,
ir_node irn_ptr,
ir_node irn_value,
ir_type type,
ir_cons_flags  flags 
)

Construct a Store node.

Parameters
irn_memmem
irn_ptrptr
irn_valuevalue
typeThe type of the object which is stored at ptr (need not match with value's type)
flagsspecifies alignment, volatility and pin state

Definition at line 2605 of file gen_irnode.c.

References new_d_Store().

void set_Store_mem ( ir_node node,
ir_node mem 
)

Sets mem input of a Store node.

Definition at line 2615 of file gen_irnode.c.

void set_Store_ptr ( ir_node node,
ir_node ptr 
)

Sets ptr input of a Store node.

Definition at line 2625 of file gen_irnode.c.

void set_Store_type ( ir_node node,
ir_type type 
)

Sets type attribute of a Store node.

Definition at line 3455 of file gen_irnode.c.

void set_Store_unaligned ( ir_node node,
ir_align  unaligned 
)

Sets unaligned attribute of a Store node.

Definition at line 3475 of file gen_irnode.c.

void set_Store_value ( ir_node node,
ir_node value 
)

Sets value input of a Store node.

Definition at line 2635 of file gen_irnode.c.

References op_Store.

void set_Store_volatility ( ir_node node,
ir_volatility  volatility 
)

Sets volatility attribute of a Store node.

Definition at line 3465 of file gen_irnode.c.

Variable Documentation

ir_op* op_Store

Store opcode.

Definition at line 3858 of file nodes.h.

Referenced by get_op_Store(), new_rd_Store(), set_Store_value(), and set_typeconst_type().