3 * File name: ir/opt/cfopt.h
4 * Purpose: control flow optimizations
5 * Author: Goetz Lindenmaier
8 * Copyright: (c) 1998-2004 Universität Karlsruhe
9 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
15 * Control flow optimization.
17 * @author Goetz Lindenmaier
24 /** Control flow optimization.
26 * Removes empty blocks doing if simplifications and loop simplifications.
27 * A block is empty if it contains only a Jmp node and Phi nodes.
28 * Merges single entry single exit blocks with their predecessor
29 * and propagates dead control flow by calling equivalent_node().
30 * Independent of compiler flag it removes Tuples from cf edges,
31 * Bad predecessors from Blocks and Phis, and unnecessary predecessors of End.
33 * @bug So far destroys backedge information.
34 * @bug Chokes on Id nodes if called in a certain order with other
35 * optimizations. Call local_optimize_graph() before to remove
38 void optimize_cf(ir_graph *irg);
40 #endif /* _CFOPT_H_ */