2 * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * File name: ir/opt/cfopt.h
23 * Purpose: control flow optimizations
24 * Author: Goetz Lindenmaier
27 * Copyright: (c) 1998-2004 Universität Karlsruhe
33 * Control flow optimization.
35 * @author Goetz Lindenmaier
42 /** Control flow optimization.
44 * Removes empty blocks doing if simplifications and loop simplifications.
45 * A block is empty if it contains only a Jmp node and Phi nodes.
46 * Merges single entry single exit blocks with their predecessor
47 * and propagates dead control flow by calling equivalent_node().
48 * Independent of compiler flag it removes Tuples from cf edges,
49 * Bad predecessors from Blocks and Phis, and unnecessary predecessors of End.
51 * @bug So far destroys backedge information.
52 * @bug Chokes on Id nodes if called in a certain order with other
53 * optimizations. Call local_optimize_graph() before to remove
56 void optimize_cf(ir_graph *irg);
58 #endif /* _CFOPT_H_ */