libFirm
|
Functions | |
void | local_optimize_node (ir_node *n) |
Applies local optimizations (see iropt.h) to all nodes reachable from node n . More... | |
ir_node * | optimize_node (ir_node *n) |
Applies local optimizations to a single node. More... | |
void | local_optimize_graph (ir_graph *irg) |
Applies local optimizations (see iropt.h) to all nodes in the graph. More... | |
void | optimize_graph_df (ir_graph *irg) |
Applies local optimizations (see iropt.h) to all nodes in the graph. More... | |
void | local_opts_const_code (void) |
Perform local optimizations on nodes on const code irg. More... | |
void | remove_unreachable_code (ir_graph *irg) |
Eliminates (obviously) unreachable code. More... | |
void | remove_bads (ir_graph *irg) |
Removes all Bad nodes from a graph. More... | |
void | remove_tuples (ir_graph *irg) |
Removes all Tuple nodes from a graph. More... | |
void | remove_critical_cf_edges (ir_graph *irg) |
Places an empty basic block on critical control flow edges thereby removing them. More... | |
void | remove_critical_cf_edges_ex (ir_graph *irg, int ignore_exception_edges) |
Places an empty basic block on critical control flow edges thereby removing them. More... | |
void local_optimize_graph | ( | ir_graph * | irg | ) |
Applies local optimizations (see iropt.h) to all nodes in the graph.
irg | The graph to be optimized. |
After applying local_optimize_graph() to a IR-graph, Bad nodes only occur as predecessor of Block and Phi nodes.
void local_optimize_node | ( | ir_node * | n | ) |
Applies local optimizations (see iropt.h) to all nodes reachable from node n
.
n | The node to be optimized. |
void local_opts_const_code | ( | void | ) |
Perform local optimizations on nodes on const code irg.
void optimize_graph_df | ( | ir_graph * | irg | ) |
Applies local optimizations (see iropt.h) to all nodes in the graph.
After applying optimize_graph_df() to a IR-graph, Bad nodes only occur as predecessor of Block and Phi nodes.
This version uses fixpoint iteration.
irg | The graph to be optimized. |
Applies local optimizations to a single node.
Node constructors call this function, so you should not need to call this manually.
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().
void remove_bads | ( | ir_graph * | irg | ) |
Removes all Bad nodes from a graph.
irg | The graph to be optimized. |
void remove_critical_cf_edges | ( | ir_graph * | irg | ) |
Places an empty basic block on critical control flow edges thereby removing them.
A critical control flow edge is an edge from a block with several control exits to a block with several control entries (See Muchnic p. 407). Exception edges are always ignored.
irg | IR Graph |
void remove_critical_cf_edges_ex | ( | ir_graph * | irg, |
int | ignore_exception_edges | ||
) |
Places an empty basic block on critical control flow edges thereby removing them.
A critical control flow edge is an edge from a block with several control exits to a block with several control entries (See Muchnic p. 407).
irg | IR Graph |
ignore_exception_edges | if non-zero, exception edges will be ignored |
void remove_tuples | ( | ir_graph * | irg | ) |
Removes all Tuple nodes from a graph.
irg | The graph to be optimized. |
void remove_unreachable_code | ( | ir_graph * | irg | ) |
Eliminates (obviously) unreachable code.