libFirm

Calls other code. More...

Enumerations

enum  n_Call { n_Call_mem, n_Call_ptr, n_Call_max = n_Call_ptr }
 Input numbers for Call node. More...
 
enum  pn_Call {
  pn_Call_M, pn_Call_T_result, pn_Call_X_regular, pn_Call_X_except,
  pn_Call_max = pn_Call_X_except
}
 Projection numbers for result of Call node (use for Proj nodes) More...
 

Functions

ir_entityget_Call_callee (const ir_node *call)
 Convenience function: Return method that will be called by a call. More...
 
ir_nodenew_rd_Call (dbg_info *dbgi, ir_node *block, ir_node *irn_mem, ir_node *irn_ptr, int arity, ir_node *const *in, ir_type *type)
 Construct a Call node. More...
 
ir_nodenew_r_Call (ir_node *block, ir_node *irn_mem, ir_node *irn_ptr, int arity, ir_node *const *in, ir_type *type)
 Construct a Call node. More...
 
ir_nodenew_d_Call (dbg_info *dbgi, ir_node *irn_mem, ir_node *irn_ptr, int arity, ir_node *const *in, ir_type *type)
 Construct a Call node. More...
 
ir_nodenew_Call (ir_node *irn_mem, ir_node *irn_ptr, int arity, ir_node *const *in, ir_type *type)
 Construct a Call node. More...
 
int is_Call (const ir_node *node)
 Test if node is a Call. More...
 
ir_nodeget_Call_mem (const ir_node *node)
 Returns mem input of a Call node. More...
 
void set_Call_mem (ir_node *node, ir_node *mem)
 Sets mem input of a Call node. More...
 
ir_nodeget_Call_ptr (const ir_node *node)
 Returns ptr input of a Call node. More...
 
void set_Call_ptr (ir_node *node, ir_node *ptr)
 Sets ptr input of a Call node. More...
 
int get_Call_n_params (ir_node const *node)
 Get the number of Call params. More...
 
ir_nodeget_Call_param (ir_node const *node, int pos)
 Get the Call param with index pos. More...
 
void set_Call_param (ir_node *node, int pos, ir_node *param)
 Set the Call param with index pos. More...
 
ir_node ** get_Call_param_arr (ir_node *node)
 Get an array of all Call params. More...
 
ir_typeget_Call_type (const ir_node *node)
 Returns type attribute of a Call node. More...
 
void set_Call_type (ir_node *node, ir_type *type)
 Sets type attribute of a Call node. More...
 
ir_opget_op_Call (void)
 Returns opcode for Call nodes. More...
 

Variables

ir_opop_Call
 Call opcode. More...
 

Detailed Description

Calls other code.

Control flow is transfered to ptr, additional operands are passed to the called code. Called code usually performs a return operation. The operands of this return operation are the result of the Call node.

Enumeration Type Documentation

enum n_Call

Input numbers for Call node.

Enumerator
n_Call_mem 

memory dependency

n_Call_ptr 

pointer to called code

n_Call_max 

Definition at line 932 of file nodes.h.

enum pn_Call

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

Enumerator
pn_Call_M 

memory result

pn_Call_T_result 

tuple containing all results

pn_Call_X_regular 

control flow when no exception occurs

pn_Call_X_except 

control flow when exception occured

pn_Call_max 

Definition at line 941 of file nodes.h.

Function Documentation

ir_entity* get_Call_callee ( const ir_node call)

Convenience function: Return method that will be called by a call.

This matches for an address at the Call ptr input, return the referenced entity if it has a method type.

ir_node* get_Call_mem ( const ir_node node)

Returns mem input of a Call node.

Definition at line 647 of file gen_irnode.c.

int get_Call_n_params ( ir_node const *  node)

Get the number of Call params.

Definition at line 667 of file gen_irnode.c.

ir_node* get_Call_param ( ir_node const *  node,
int  pos 
)

Get the Call param with index pos.

Definition at line 672 of file gen_irnode.c.

ir_node** get_Call_param_arr ( ir_node node)

Get an array of all Call params.

Definition at line 682 of file gen_irnode.c.

References op_Call.

ir_node* get_Call_ptr ( const ir_node node)

Returns ptr input of a Call node.

Definition at line 657 of file gen_irnode.c.

ir_type* get_Call_type ( const ir_node node)

Returns type attribute of a Call node.

Definition at line 3060 of file gen_irnode.c.

ir_op* get_op_Call ( void  )

Returns opcode for Call nodes.

Definition at line 687 of file gen_irnode.c.

References op_Call.

int is_Call ( const ir_node node)

Test if node is a Call.

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

Definition at line 3055 of file gen_irnode.c.

ir_node* new_Call ( ir_node irn_mem,
ir_node irn_ptr,
int  arity,
ir_node *const *  in,
ir_type type 
)

Construct a Call node.

Parameters
irn_memmem
irn_ptrptr
aritysize of additional inputs array
inadditional inputs
typetype of the call (usually type of the called procedure)

Definition at line 642 of file gen_irnode.c.

References new_d_Call().

ir_node* new_d_Call ( dbg_info dbgi,
ir_node irn_mem,
ir_node irn_ptr,
int  arity,
ir_node *const *  in,
ir_type type 
)

Construct a Call node.

Parameters
dbgiA pointer to debug information.
irn_memmem
irn_ptrptr
aritysize of additional inputs array
inadditional inputs
typetype of the call (usually type of the called procedure)

Definition at line 635 of file gen_irnode.c.

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

Referenced by new_Call().

ir_node* new_r_Call ( ir_node block,
ir_node irn_mem,
ir_node irn_ptr,
int  arity,
ir_node *const *  in,
ir_type type 
)

Construct a Call node.

Parameters
blockThe IR block the node belongs to.
irn_memmem
irn_ptrptr
aritysize of additional inputs array
inadditional inputs
typetype of the call (usually type of the called procedure)

Definition at line 630 of file gen_irnode.c.

References new_rd_Call().

ir_node* new_rd_Call ( dbg_info dbgi,
ir_node block,
ir_node irn_mem,
ir_node irn_ptr,
int  arity,
ir_node *const *  in,
ir_type type 
)

Construct a Call node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_memmem
irn_ptrptr
aritysize of additional inputs array
inadditional inputs
typetype of the call (usually type of the called procedure)

Definition at line 606 of file gen_irnode.c.

References ALLOCAN, get_irn_irg(), get_unknown_type(), is_Method_type(), mode_T, new_ir_node(), op_Call, op_pin_state_pinned, optimize_node(), and verify_new_node().

Referenced by new_d_Call(), and new_r_Call().

void set_Call_mem ( ir_node node,
ir_node mem 
)

Sets mem input of a Call node.

Definition at line 652 of file gen_irnode.c.

void set_Call_param ( ir_node node,
int  pos,
ir_node param 
)

Set the Call param with index pos.

Definition at line 677 of file gen_irnode.c.

void set_Call_ptr ( ir_node node,
ir_node ptr 
)

Sets ptr input of a Call node.

Definition at line 662 of file gen_irnode.c.

void set_Call_type ( ir_node node,
ir_type type 
)

Sets type attribute of a Call node.

Definition at line 3065 of file gen_irnode.c.

Variable Documentation

ir_op* op_Call

Call opcode.

Definition at line 1025 of file nodes.h.

Referenced by get_Call_param_arr(), get_op_Call(), new_rd_Call(), and set_typeconst_type().