libFirm
Alloc node

allocates a block of memory. More...

Enumerations

enum  ir_where_alloc { stack_alloc, heap_alloc }
 The allocation place. More...
enum  n_Alloc { n_Alloc_mem, n_Alloc_count, n_Alloc_max = n_Alloc_count }
 Input numbers for Alloc node. More...
enum  pn_Alloc {
  pn_Alloc_M, pn_Alloc_res, pn_Alloc_X_regular, pn_Alloc_X_except,
  pn_Alloc_max = pn_Alloc_X_except
}
 Projection numbers for result of Alloc node (use for Proj nodes) More...

Functions

ir_nodenew_rd_Alloc (dbg_info *dbgi, ir_node *block, ir_node *irn_mem, ir_node *irn_count, ir_type *type, ir_where_alloc where)
 Construct an Alloc node.
ir_nodenew_r_Alloc (ir_node *block, ir_node *irn_mem, ir_node *irn_count, ir_type *type, ir_where_alloc where)
 Construct an Alloc node.
ir_nodenew_d_Alloc (dbg_info *dbgi, ir_node *irn_mem, ir_node *irn_count, ir_type *type, ir_where_alloc where)
 Construct an Alloc node.
ir_nodenew_Alloc (ir_node *irn_mem, ir_node *irn_count, ir_type *type, ir_where_alloc where)
 Construct an Alloc node.
int is_Alloc (const ir_node *node)
 Test if node is a Alloc.
ir_nodeget_Alloc_mem (const ir_node *node)
 Returns mem input of an Alloc node.
void set_Alloc_mem (ir_node *node, ir_node *mem)
 Sets mem input of an Alloc node.
ir_nodeget_Alloc_count (const ir_node *node)
 Returns count input of an Alloc node.
void set_Alloc_count (ir_node *node, ir_node *count)
 Sets count input of an Alloc node.
ir_typeget_Alloc_type (const ir_node *node)
 Returns type attribute of an Alloc node.
void set_Alloc_type (ir_node *node, ir_type *type)
 Sets type attribute of an Alloc node.
ir_where_alloc get_Alloc_where (const ir_node *node)
 Returns where attribute of an Alloc node.
void set_Alloc_where (ir_node *node, ir_where_alloc where)
 Sets where attribute of an Alloc node.
ir_opget_op_Alloc (void)
 Returns opcode for Alloc nodes.

Variables

ir_opop_Alloc
 Alloc opcode.

Detailed Description

allocates a block of memory.

It can be specified whether the memory should be allocated to the stack or to the heap. Allocates memory for one or more objects (depending on value on count input).

Enumeration Type Documentation

The allocation place.

Enumerator:
stack_alloc 

Alloc allocates the object on the stack.

heap_alloc 

Alloc allocates the object on the heap.

Definition at line 336 of file firm_types.h.

enum n_Alloc

Input numbers for Alloc node.

Definition at line 168 of file nodeops.h.

enum pn_Alloc

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

Enumerator:
pn_Alloc_M 

memory result

pn_Alloc_res 

pointer to newly allocated memory

pn_Alloc_X_regular 

control flow when no exception occurs

pn_Alloc_X_except 

control flow when exception occured

Definition at line 178 of file nodeops.h.

Function Documentation

ir_node* get_Alloc_count ( const ir_node node)

Returns count input of an Alloc node.

ir_node* get_Alloc_mem ( const ir_node node)

Returns mem input of an Alloc node.

ir_type* get_Alloc_type ( const ir_node node)

Returns type attribute of an Alloc node.

ir_where_alloc get_Alloc_where ( const ir_node node)

Returns where attribute of an Alloc node.

ir_op* get_op_Alloc ( void  )

Returns opcode for Alloc nodes.

int is_Alloc ( const ir_node node)

Test if node is a Alloc.

Returns
1 if the node is a Alloc node, 0 otherwise
ir_node* new_Alloc ( ir_node irn_mem,
ir_node irn_count,
ir_type type,
ir_where_alloc  where 
)

Construct an Alloc node.

Parameters
irn_memmemory dependency
irn_countnumber of objects to allocate
typetype of the objects to allocate
wherewhether to allocate the variable on the stack or heap
ir_node* new_d_Alloc ( dbg_info dbgi,
ir_node irn_mem,
ir_node irn_count,
ir_type type,
ir_where_alloc  where 
)

Construct an Alloc node.

Parameters
dbgiA pointer to debug information.
irn_memmemory dependency
irn_countnumber of objects to allocate
typetype of the objects to allocate
wherewhether to allocate the variable on the stack or heap
ir_node* new_r_Alloc ( ir_node block,
ir_node irn_mem,
ir_node irn_count,
ir_type type,
ir_where_alloc  where 
)

Construct an Alloc node.

Parameters
blockThe IR block the node belongs to.
irn_memmemory dependency
irn_countnumber of objects to allocate
typetype of the objects to allocate
wherewhether to allocate the variable on the stack or heap
ir_node* new_rd_Alloc ( dbg_info dbgi,
ir_node block,
ir_node irn_mem,
ir_node irn_count,
ir_type type,
ir_where_alloc  where 
)

Construct an Alloc node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_memmemory dependency
irn_countnumber of objects to allocate
typetype of the objects to allocate
wherewhether to allocate the variable on the stack or heap
void set_Alloc_count ( ir_node node,
ir_node count 
)

Sets count input of an Alloc node.

void set_Alloc_mem ( ir_node node,
ir_node mem 
)

Sets mem input of an Alloc node.

void set_Alloc_type ( ir_node node,
ir_type type 
)

Sets type attribute of an Alloc node.

void set_Alloc_where ( ir_node node,
ir_where_alloc  where 
)

Sets where attribute of an Alloc node.

Variable Documentation

ir_op* op_Alloc

Alloc opcode.

Definition at line 103 of file opcodes.h.