libFirm

Functions

void local_optimize_node (ir_node *n)
 Applies local optimizations (see iropt.h) to all nodes reachable from node n. More...
 
ir_nodeoptimize_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...
 

Detailed Description

Function Documentation

◆ local_optimize_graph()

void local_optimize_graph ( ir_graph irg)

Applies local optimizations (see iropt.h) to all nodes in the graph.

Parameters
irgThe graph to be optimized.

After applying local_optimize_graph() to a IR-graph, Bad nodes only occur as predecessor of Block and Phi nodes.

◆ local_optimize_node()

void local_optimize_node ( ir_node n)

Applies local optimizations (see iropt.h) to all nodes reachable from node n.

Parameters
nThe node to be optimized.

◆ local_opts_const_code()

void local_opts_const_code ( void  )

Perform local optimizations on nodes on const code irg.

◆ optimize_graph_df()

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.

Parameters
irgThe graph to be optimized.

◆ optimize_node()

ir_node* optimize_node ( ir_node n)

Applies local optimizations to a single node.

Node constructors call this function, so you should not need to call this manually.

◆ remove_bads()

void remove_bads ( ir_graph irg)

Removes all Bad nodes from a graph.

Parameters
irgThe graph to be optimized.

◆ remove_critical_cf_edges()

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.

Parameters
irgIR Graph

◆ remove_critical_cf_edges_ex()

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).

Parameters
irgIR Graph
ignore_exception_edgesif non-zero, exception edges will be ignored

◆ remove_tuples()

void remove_tuples ( ir_graph irg)

Removes all Tuple nodes from a graph.

Parameters
irgThe graph to be optimized.

◆ remove_unreachable_code()

void remove_unreachable_code ( ir_graph irg)

Eliminates (obviously) unreachable code.