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_node ** | get_Call_param_arr (ir_node *node) |
Returns parameter inputs of Call node node as array. | |
int | get_Call_n_params (const ir_node *node) |
Returns the number of parameters of a call. | |
ir_node * | get_Call_param (const ir_node *node, int pos) |
Returns the call parameter at position pos. | |
void | set_Call_param (ir_node *node, int pos, ir_node *param) |
Sets the call parameter at position pos. | |
int | Call_has_callees (const ir_node *node) |
Sets, get and remove the callee information for a Call node. | |
size_t | get_Call_n_callees (const ir_node *node) |
Returns the number of callees of Call node node . | |
ir_entity * | get_Call_callee (const ir_node *node, size_t pos) |
Returns callee number pos of Call node node . | |
void | set_Call_callee_arr (ir_node *node, size_t n, ir_entity **arr) |
Sets the full callee array. | |
void | remove_Call_callee_arr (ir_node *node) |
Frees callee array of call node node . | |
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. | |
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. | |
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. | |
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. | |
int | is_Call (const ir_node *node) |
Test if node is a Call. | |
ir_node * | get_Call_mem (const ir_node *node) |
Returns mem input of a Call node. | |
void | set_Call_mem (ir_node *node, ir_node *mem) |
Sets mem input of a Call node. | |
ir_node * | get_Call_ptr (const ir_node *node) |
Returns ptr input of a Call node. | |
void | set_Call_ptr (ir_node *node, ir_node *ptr) |
Sets ptr input of a Call node. | |
ir_type * | get_Call_type (const ir_node *node) |
Returns type attribute of a Call node. | |
void | set_Call_type (ir_node *node, ir_type *type) |
Sets type attribute of a Call node. | |
ir_op * | get_op_Call (void) |
Returns opcode for Call nodes. |
Variables | |
ir_op * | op_Call |
Call opcode. |
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.
enum pn_Call |
int Call_has_callees | ( | const ir_node * | node | ) |
Sets, get and remove the callee information for a Call node.
The callee information lists all method entities that can be called from this node. If the address expression can not be analyzed fully, e.g., as entities can be called that are not in the compilation unit, the array contains the unknown_entity. The array contains only entities with peculiarity_existent, but with all kinds of visibility. The entities not necessarily contain an irg.
The array is only accessible if callee information is valid. See flag in graph.
The memory allocated for the array is managed automatically, i.e., it must not be freed if the Call node is removed from the graph.
node | A Call node. |
Returns callee number pos
of Call node node
.
size_t get_Call_n_callees | ( | const ir_node * | node | ) |
Returns the number of callees of Call node node
.
int get_Call_n_params | ( | const ir_node * | node | ) |
Returns the number of parameters of a call.
Returns the call parameter at position pos.
ir_op* get_op_Call | ( | void | ) |
Returns opcode for Call nodes.
int is_Call | ( | const ir_node * | node | ) |
Test if node is a Call.
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.
irn_mem | memory dependency |
irn_ptr | pointer to called code |
arity | size of additional inputs array |
in | additional inputs |
type | type of the call (usually type of the called procedure) |
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.
dbgi | A pointer to debug information. |
irn_mem | memory dependency |
irn_ptr | pointer to called code |
arity | size of additional inputs array |
in | additional inputs |
type | type of the call (usually type of the called procedure) |
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.
block | The IR block the node belongs to. |
irn_mem | memory dependency |
irn_ptr | pointer to called code |
arity | size of additional inputs array |
in | additional inputs |
type | type of the call (usually type of the called procedure) |
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.
dbgi | A pointer to debug information. |
block | The IR block the node belongs to. |
irn_mem | memory dependency |
irn_ptr | pointer to called code |
arity | size of additional inputs array |
in | additional inputs |
type | type of the call (usually type of the called procedure) |
void remove_Call_callee_arr | ( | ir_node * | node | ) |
Frees callee array of call node node
.
Sets the full callee array.
The passed array is copied. Assumes current_ir_graph set properly!
Sets the call parameter at position pos.