libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
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 373 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 382 of file nodes.h.

Function Documentation

unsigned get_Alloc_alignment ( const ir_node node)

Returns alignment attribute of an Alloc node.

Definition at line 2984 of file gen_irnode.c.

ir_node* get_Alloc_mem ( const ir_node node)

Returns mem input of an Alloc node.

Definition at line 216 of file gen_irnode.c.

ir_node* get_Alloc_size ( const ir_node node)

Returns size input of an Alloc node.

Definition at line 226 of file gen_irnode.c.

ir_op* get_op_Alloc ( void  )

Returns opcode for Alloc nodes.

Definition at line 236 of file gen_irnode.c.

References op_Alloc.

int is_Alloc ( const ir_node node)

Test if node is a Alloc.

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

Definition at line 2979 of file gen_irnode.c.

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)

Definition at line 211 of file gen_irnode.c.

References new_d_Alloc().

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)

Definition at line 204 of file gen_irnode.c.

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

Referenced by new_Alloc().

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)

Definition at line 199 of file gen_irnode.c.

References new_rd_Alloc().

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)

Definition at line 182 of file gen_irnode.c.

References get_irn_irg(), mode_T, new_ir_node(), op_Alloc, optimize_node(), and verify_new_node().

Referenced by new_d_Alloc(), and new_r_Alloc().

void set_Alloc_alignment ( ir_node node,
unsigned  alignment 
)

Sets alignment attribute of an Alloc node.

Definition at line 2989 of file gen_irnode.c.

void set_Alloc_mem ( ir_node node,
ir_node mem 
)

Sets mem input of an Alloc node.

Definition at line 221 of file gen_irnode.c.

void set_Alloc_size ( ir_node node,
ir_node size 
)

Sets size input of an Alloc node.

Definition at line 231 of file gen_irnode.c.

Variable Documentation

ir_op* op_Alloc

Alloc opcode.

Definition at line 448 of file nodes.h.

Referenced by get_op_Alloc(), and new_rd_Alloc().