libFirm

Last node of a graph. More...

Functions

void add_End_keepalive (ir_node *end, ir_node *ka)
 Keep alive dedicated nodes. More...
 
void set_End_keepalives (ir_node *end, int n, ir_node *in[])
 Sets new keep-alives. More...
 
void remove_End_keepalive (ir_node *end, const ir_node *irn)
 Removes irn from the keep-alive set. More...
 
void remove_End_n (ir_node *end, int idx)
 Removes predecessor (a keepalive) at index idx from End node end. More...
 
void remove_End_Bads_and_doublets (ir_node *end)
 Removes Bads, NoMem and doublets from the keep-alive set. More...
 
void free_End (ir_node *end)
 Some parts of the End node are allocated separately – their memory is not recovered by dead_node_elimination if a End node is dead. More...
 
ir_node * new_rd_End (dbg_info *dbgi, ir_graph *irg, int arity, ir_node *const *in)
 Construct an End node. More...
 
ir_node * new_r_End (ir_graph *irg, int arity, ir_node *const *in)
 Construct an End node. More...
 
ir_node * new_d_End (dbg_info *dbgi, int arity, ir_node *const *in)
 Construct an End node. More...
 
ir_node * new_End (int arity, ir_node *const *in)
 Construct an End node. More...
 
int is_End (const ir_node *node)
 Test if node is a End. More...
 
int get_End_n_keepalives (ir_node const *node)
 Get the number of End keepalives. More...
 
ir_node * get_End_keepalive (ir_node const *node, int pos)
 Get the End keepalive with index pos. More...
 
void set_End_keepalive (ir_node *node, int pos, ir_node *keepalive)
 Set the End keepalive with index pos. More...
 
ir_node ** get_End_keepalive_arr (ir_node *node)
 Get an array of all End keepalives. More...
 
ir_op * get_op_End (void)
 Returns opcode for End nodes. More...
 

Variables

ir_op * op_End
 End opcode. More...
 

Detailed Description

Last node of a graph.

It references nodes in endless loops (so called keepalive edges)

Function Documentation

void add_End_keepalive ( ir_node *  end,
ir_node *  ka 
)

Keep alive dedicated nodes.

These must be either PhiM or Block nodes.

void free_End ( ir_node *  end)

Some parts of the End node are allocated separately – their memory is not recovered by dead_node_elimination if a End node is dead.

free_End() frees these data structures.

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

Get the End keepalive with index pos.

Definition at line 1160 of file gen_irnode.c.

ir_node** get_End_keepalive_arr ( ir_node *  node)

Get an array of all End keepalives.

Definition at line 1170 of file gen_irnode.c.

References op_End.

int get_End_n_keepalives ( ir_node const *  node)

Get the number of End keepalives.

Definition at line 1155 of file gen_irnode.c.

ir_op* get_op_End ( void  )

Returns opcode for End nodes.

Definition at line 1175 of file gen_irnode.c.

References op_End.

int is_End ( const ir_node *  node)

Test if node is a End.

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

Definition at line 3195 of file gen_irnode.c.

ir_node* new_d_End ( dbg_info *  dbgi,
int  arity,
ir_node *const *  in 
)

Construct an End node.

Parameters
dbgiA pointer to debug information.
aritysize of additional inputs array
inadditional inputs

Definition at line 1143 of file gen_irnode.c.

References current_ir_graph, IR_GRAPH_CONSTRAINT_CONSTRUCTION, irg_is_constrained(), and new_rd_End().

Referenced by new_End().

ir_node* new_End ( int  arity,
ir_node *const *  in 
)

Construct an End node.

Parameters
aritysize of additional inputs array
inadditional inputs

Definition at line 1150 of file gen_irnode.c.

References new_d_End().

ir_node* new_r_End ( ir_graph *  irg,
int  arity,
ir_node *const *  in 
)

Construct an End node.

Parameters
irgThe IR graph the node belongs to.
aritysize of additional inputs array
inadditional inputs

Definition at line 1138 of file gen_irnode.c.

References new_rd_End().

ir_node* new_rd_End ( dbg_info *  dbgi,
ir_graph *  irg,
int  arity,
ir_node *const *  in 
)

Construct an End node.

Parameters
dbgiA pointer to debug information.
irgThe IR graph the node belongs to.
aritysize of additional inputs array
inadditional inputs

Definition at line 1125 of file gen_irnode.c.

References get_irg_end_block(), mode_X, new_ir_node(), op_End, optimize_node(), and verify_new_node().

Referenced by new_d_End(), and new_r_End().

void remove_End_Bads_and_doublets ( ir_node *  end)

Removes Bads, NoMem and doublets from the keep-alive set.

void remove_End_keepalive ( ir_node *  end,
const ir_node *  irn 
)

Removes irn from the keep-alive set.

void remove_End_n ( ir_node *  end,
int  idx 
)

Removes predecessor (a keepalive) at index idx from End node end.

void set_End_keepalive ( ir_node *  node,
int  pos,
ir_node *  keepalive 
)

Set the End keepalive with index pos.

Definition at line 1165 of file gen_irnode.c.

void set_End_keepalives ( ir_node *  end,
int  n,
ir_node *  in[] 
)

Sets new keep-alives.

Beware: This might be an expensive operation if dynamic edges are enabled, so avoid it in the backend.

Variable Documentation

ir_op* op_End

End opcode.

Definition at line 1759 of file nodes.h.

Referenced by get_End_keepalive_arr(), get_op_End(), new_rd_End(), and set_typeconst_type().