libFirm
|
Typedefs | |
typedef ir_node * | uninitialized_local_variable_func_t (ir_graph *irg, ir_mode *mode, int pos) |
This function is called, whenever a local variable is used before definition. More... | |
Functions | |
ir_graph * | get_current_ir_graph (void) |
Returns graph which is currently constructed. More... | |
void | set_current_ir_graph (ir_graph *graph) |
Sets graph which is currently constructed. More... | |
ir_node * | new_d_immBlock (dbg_info *db) |
Create an immature Block. More... | |
ir_node * | new_immBlock (void) |
Create an immature Block. More... | |
ir_node * | new_r_immBlock (ir_graph *irg) |
Create an immature Block. More... | |
ir_node * | new_rd_immBlock (dbg_info *db, ir_graph *irg) |
Create an immature Block. More... | |
void | add_immBlock_pred (ir_node *immblock, ir_node *jmp) |
Add a control flow edge to an immature block. More... | |
void | mature_immBlock (ir_node *block) |
Finalize a Block node, when all control flows are known. More... | |
void | set_cur_block (ir_node *target) |
Sets the current block in which the following constructors place the nodes they construct. More... | |
void | set_r_cur_block (ir_graph *irg, ir_node *target) |
Sets current block of a given graph. More... | |
ir_node * | get_cur_block (void) |
Returns the current block of the current graph. More... | |
ir_node * | get_r_cur_block (ir_graph *irg) |
Returns current block of a given graph. More... | |
ir_node * | get_value (int pos, ir_mode *mode) |
Returns the current value of a local variable. More... | |
ir_node * | get_r_value (ir_graph *irg, int pos, ir_mode *mode) |
Returns the current value of a local variable in given graph. More... | |
ir_mode * | ir_guess_mode (int pos) |
Try to guess the mode of a local variable. More... | |
ir_mode * | ir_r_guess_mode (ir_graph *irg, int pos) |
Try to guess the mode of a local variable in a given graph. More... | |
void | set_value (int pos, ir_node *value) |
Memorize a new definition of a variable. More... | |
void | set_r_value (ir_graph *irg, int pos, ir_node *value) |
Sets current value of a variable in a given graph. More... | |
ir_node * | get_store (void) |
Returns the current memory state. More... | |
ir_node * | get_r_store (ir_graph *irg) |
Returns current memory state for a given graph. More... | |
void | set_store (ir_node *store) |
Memorize a new definition of the memory state. More... | |
void | set_r_store (ir_graph *irg, ir_node *store) |
Sets current memory state for a given graph. More... | |
void | keep_alive (ir_node *ka) |
keep this node alive even if End is not control-reachable from it More... | |
void | irg_finalize_cons (ir_graph *irg) |
Puts the graph into state "phase_high". More... | |
void | verify_new_node (ir_node *node) |
If firm is built in debug mode, verify that a newly created node is fine. More... | |
void | ir_set_uninitialized_local_variable_func (uninitialized_local_variable_func_t *func) |
Register a new callback for the case that the value of an uninitialized variable is requested. More... | |
Variables | |
ir_graph * | current_ir_graph |
Global variable holding the graph which is currently constructed. More... | |
This function is called, whenever a local variable is used before definition.
irg | the IR graph on which this happens |
mode | the mode of the local var |
pos | position chosen be the frontend for this variable (n_loc) |
mode
that initializes the var at position posDefinition at line 120 of file firm_types.h.
Add a control flow edge to an immature block.
ir_node* get_cur_block | ( | void | ) |
Returns the current block of the current graph.
Referenced by new_d_Add(), new_d_Alloc(), new_d_And(), new_d_Bitcast(), new_d_Builtin(), new_d_Call(), new_d_Cmp(), new_d_Cond(), new_d_Confirm(), new_d_Conv(), new_d_CopyB(), new_d_Div(), new_d_Eor(), new_d_Free(), new_d_IJmp(), new_d_Jmp(), new_d_Load(), new_d_Member(), new_d_Minus(), new_d_Mod(), new_d_Mul(), new_d_Mulh(), new_d_Mux(), new_d_Not(), new_d_Or(), new_d_Phi(), new_d_Pin(), new_d_Raise(), new_d_Return(), new_d_Sel(), new_d_Shl(), new_d_Shr(), new_d_Shrs(), new_d_Store(), new_d_Sub(), new_d_Switch(), new_d_Sync(), and new_d_Tuple().
ir_graph* get_current_ir_graph | ( | void | ) |
Returns graph which is currently constructed.
Returns current memory state for a given graph.
Returns the current value of a local variable in given graph.
ir_node* get_store | ( | void | ) |
Returns the current memory state.
Use this function to obtain the last definition of the memory state. This call automatically inserts Phi nodes for the memory state value.
Returns the current value of a local variable.
Use this function to obtain the last definition of the local variable associated with pos. pos must be less than the value passed as n_loc to new_ir_graph. This call automatically inserts Phi nodes.
pos | The position/id of the local variable. |
*mode | The mode of the value to get. |
ir_mode* ir_guess_mode | ( | int | pos | ) |
Try to guess the mode of a local variable.
This is done by recursively going up the control flow graph until we find a definition for the variable. The mode of the first found definition is returned. NULL in case no definition is found.
pos | The position/id of the local variable. |
Try to guess the mode of a local variable in a given graph.
void ir_set_uninitialized_local_variable_func | ( | uninitialized_local_variable_func_t * | func | ) |
Register a new callback for the case that the value of an uninitialized variable is requested.
void irg_finalize_cons | ( | ir_graph * | irg | ) |
Puts the graph into state "phase_high".
void keep_alive | ( | ir_node * | ka | ) |
keep this node alive even if End is not control-reachable from it
ka | The node to keep alive. |
void mature_immBlock | ( | ir_node * | block | ) |
Finalize a Block node, when all control flows are known.
Create an immature Block.
An immature Block has an unknown number of predecessors. Predecessors can be added with add_immBlock_pred(). Once all predecessors are added the block must be matured.
Adds the block to the graph in current_ir_graph. This constructor can only be used if the graph is in state_building.
ir_node* new_immBlock | ( | void | ) |
Create an immature Block.
An immature Block has an unknown number of predecessors. Predecessors can be added with add_immBlock_pred(). Once all predecessors are added the block must be matured.
Adds the block to the graph in current_ir_graph. This constructor can only be used if the graph is in state_building.
Create an immature Block.
An immature Block has an unknown number of predecessors. Predecessors can be added with add_immBlock_pred(). Once all predecessors are added the block must be matured.
This constructor can only be used if the graph is in state_building.
Create an immature Block.
An immature Block has an unknown number of predecessors. Predecessors can be added with add_immBlock_pred(). Once all predecessors are added the block must be matured.
This constructor can only be used if the graph is in state_building.
void set_cur_block | ( | ir_node * | target | ) |
Sets the current block in which the following constructors place the nodes they construct.
target | The new current block. |
void set_current_ir_graph | ( | ir_graph * | graph | ) |
Sets graph which is currently constructed.
Sets current block of a given graph.
Sets current memory state for a given graph.
Sets current value of a variable in a given graph.
void set_store | ( | ir_node * | store | ) |
Memorize a new definition of the memory state.
Use this function to remember a new definition of the memory state. This call is needed to automatically inserts Phi nodes.
*store | The new memory state. |
void set_value | ( | int | pos, |
ir_node * | value | ||
) |
Memorize a new definition of a variable.
Use this function to remember a new definition of the value associated with pos. pos must be less than the value passed as n_loc to new_ir_graph. This call is needed to automatically inserts Phi nodes.
pos | The position/id of the local variable. |
*value | The new value written to the local variable. |
void verify_new_node | ( | ir_node * | node | ) |
If firm is built in debug mode, verify that a newly created node is fine.
The normal node constructors already call this function, you only need to call this yourself if you create new node constructors on your own.
Referenced by new_rd_Add(), new_rd_Address(), new_rd_Align(), new_rd_Alloc(), new_rd_And(), new_rd_Bad(), new_rd_Bitcast(), new_rd_Block(), new_rd_Builtin(), new_rd_Call(), new_rd_Cmp(), new_rd_Cond(), new_rd_Confirm(), new_rd_Const(), new_rd_Conv(), new_rd_CopyB(), new_rd_Div(), new_rd_Dummy(), new_rd_End(), new_rd_Eor(), new_rd_Free(), new_rd_IJmp(), new_rd_Jmp(), new_rd_Load(), new_rd_Member(), new_rd_Minus(), new_rd_Mod(), new_rd_Mul(), new_rd_Mulh(), new_rd_Mux(), new_rd_NoMem(), new_rd_Not(), new_rd_Offset(), new_rd_Or(), new_rd_Phi(), new_rd_Pin(), new_rd_Proj(), new_rd_Raise(), new_rd_Return(), new_rd_Sel(), new_rd_Shl(), new_rd_Shr(), new_rd_Shrs(), new_rd_Size(), new_rd_Start(), new_rd_Store(), new_rd_Sub(), new_rd_Switch(), new_rd_Sync(), new_rd_Tuple(), and new_rd_Unknown().
ir_graph* current_ir_graph |
Global variable holding the graph which is currently constructed.
Definition at line 528 of file ircons.h.
Referenced by new_d_Add(), new_d_Address(), new_d_Align(), new_d_Alloc(), new_d_And(), new_d_Bad(), new_d_Bitcast(), new_d_Block(), new_d_Builtin(), new_d_Call(), new_d_Cmp(), new_d_Cond(), new_d_Confirm(), new_d_Const(), new_d_Conv(), new_d_CopyB(), new_d_Div(), new_d_Dummy(), new_d_End(), new_d_Eor(), new_d_Free(), new_d_IJmp(), new_d_Jmp(), new_d_Load(), new_d_Member(), new_d_Minus(), new_d_Mod(), new_d_Mul(), new_d_Mulh(), new_d_Mux(), new_d_NoMem(), new_d_Not(), new_d_Offset(), new_d_Or(), new_d_Phi(), new_d_Pin(), new_d_Proj(), new_d_Raise(), new_d_Return(), new_d_Sel(), new_d_Shl(), new_d_Shr(), new_d_Shrs(), new_d_Size(), new_d_Start(), new_d_Store(), new_d_Sub(), new_d_Switch(), new_d_Sync(), new_d_Tuple(), and new_d_Unknown().