libFirm
Alloc node

Allocates a block of memory on the stack. More...

Enumerations

enum  n_Alloc { n_Alloc_mem, n_Alloc_size, n_Alloc_max = n_Alloc_size }
 Input numbers for Alloc node. More...
 
enum  pn_Alloc { pn_Alloc_M, pn_Alloc_res, pn_Alloc_max = pn_Alloc_res }
 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_size, unsigned alignment)
 Construct an Alloc node. More...
 
ir_nodenew_r_Alloc (ir_node *block, ir_node *irn_mem, ir_node *irn_size, unsigned alignment)
 Construct an Alloc node. More...
 
ir_nodenew_d_Alloc (dbg_info *dbgi, ir_node *irn_mem, ir_node *irn_size, unsigned alignment)
 Construct an Alloc node. More...
 
ir_nodenew_Alloc (ir_node *irn_mem, ir_node *irn_size, unsigned alignment)
 Construct an Alloc node. More...
 
int is_Alloc (const ir_node *node)
 Test if node is a Alloc. More...
 
ir_nodeget_Alloc_mem (const ir_node *node)
 Returns mem input of an Alloc node. More...
 
void set_Alloc_mem (ir_node *node, ir_node *mem)
 Sets mem input of an Alloc node. More...
 
ir_nodeget_Alloc_size (const ir_node *node)
 Returns size input of an Alloc node. More...
 
void set_Alloc_size (ir_node *node, ir_node *size)
 Sets size input of an Alloc node. More...
 
unsigned get_Alloc_alignment (const ir_node *node)
 Returns alignment attribute of an Alloc node. More...
 
void set_Alloc_alignment (ir_node *node, unsigned alignment)
 Sets alignment attribute of an Alloc node. More...
 
ir_opget_op_Alloc (void)
 Returns opcode for Alloc nodes. More...
 

Variables

ir_opop_Alloc
 Alloc opcode. More...
 

Detailed Description

Allocates a block of memory on the stack.

Enumeration Type Documentation

enum n_Alloc

Input numbers for Alloc node.

Enumerator
n_Alloc_mem 

memory dependency

n_Alloc_size 

size of the block in bytes

n_Alloc_max 

Definition at line 374 of file nodes.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_max 

Definition at line 383 of file nodes.h.

Function Documentation

unsigned get_Alloc_alignment ( const ir_node node)

Returns alignment attribute of an Alloc node.

ir_node* get_Alloc_mem ( const ir_node node)

Returns mem input of an Alloc node.

ir_node* get_Alloc_size ( const ir_node node)

Returns size input 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_size,
unsigned  alignment 
)

Construct an Alloc node.

Parameters
irn_memmem
irn_sizesize
alignmentalignment of the memory block (must be a power of 2)
ir_node* new_d_Alloc ( dbg_info dbgi,
ir_node irn_mem,
ir_node irn_size,
unsigned  alignment 
)

Construct an Alloc node.

Parameters
dbgiA pointer to debug information.
irn_memmem
irn_sizesize
alignmentalignment of the memory block (must be a power of 2)
ir_node* new_r_Alloc ( ir_node block,
ir_node irn_mem,
ir_node irn_size,
unsigned  alignment 
)

Construct an Alloc node.

Parameters
blockThe IR block the node belongs to.
irn_memmem
irn_sizesize
alignmentalignment of the memory block (must be a power of 2)
ir_node* new_rd_Alloc ( dbg_info dbgi,
ir_node block,
ir_node irn_mem,
ir_node irn_size,
unsigned  alignment 
)

Construct an Alloc node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_memmem
irn_sizesize
alignmentalignment of the memory block (must be a power of 2)
void set_Alloc_alignment ( ir_node node,
unsigned  alignment 
)

Sets alignment attribute of an Alloc node.

void set_Alloc_mem ( ir_node node,
ir_node mem 
)

Sets mem input of an Alloc node.

void set_Alloc_size ( ir_node node,
ir_node size 
)

Sets size input of an Alloc node.

Variable Documentation

ir_op* op_Alloc

Alloc opcode.

Definition at line 449 of file nodes.h.