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 * @brief Definitions for optimisation flags
23 * @author Michael Beck
27 /** Turn off all optimizations. */
28 I_FLAG(optimize , 0, ON)
30 /** Common subexpression eliminations: Hash the nodes. */
33 /** Don't use block predecessor for comparison.
34 * Default must be zero as code placement must
35 * be run right after a local optimize walk with
37 I_FLAG(global_cse , 2, OFF)
39 /** Evaluate operations. */
40 I_FLAG(constant_folding , 3, ON)
42 /** Bad node propagation. */
43 I_FLAG(unreachable_code , 4, ON)
46 I_FLAG(control_flow_straightening , 5, ON)
49 I_FLAG(control_flow_weak_simplification , 6, ON)
52 I_FLAG(control_flow_strong_simplification , 7, ON)
54 /** Reclaim memory. */
55 I_FLAG(dead_node_elimination , 8, ON)
57 /** Reassociate nodes. */
58 I_FLAG(reassociation , 9, ON)
60 /** Do inlining transformation. */
61 I_FLAG(inline , 10, ON)
63 /** Remove dynamic method dispatch. */
64 E_FLAG(dyn_meth_dispatch , 11, ON)
66 /** Transformations that normalize the firm representation
67 * as removing Ids and Tuples, useless Phis, SymConst(id) -> Const(entity) ...
69 I_FLAG(normalize , 12, ON)
71 /** Remove tail-recursion. */
72 I_FLAG(tail_recursion , 13, ON)
74 /** Free never called methods */
75 I_FLAG(dead_method_elimination , 14, ON)
77 /** precise exception context */
78 I_FLAG(precise_exc_context , 15, ON)
80 /** Do loop unrolling */
81 I_FLAG(loop_unrolling , 16, OFF) /* currently buggy, 2.1.2006 */
83 /** Do Strength reduction */
84 I_FLAG(strength_red , 17, ON)
86 /** Optimize Loads and Stores */
87 I_FLAG(redundant_loadstore , 18, ON)
89 /** Optimize Fragile OPs */
90 I_FLAG(fragile_ops , 19, OFF)
93 I_FLAG(if_conversion , 20, OFF)
95 /** Optimize function calls. */
96 I_FLAG(function_call , 21, ON)
98 /** Optimize cast nodes. */
99 E_FLAG(optimize_class_casts , 22, ON)
100 E_FLAG(suppress_downcast_optimization , 23, OFF)
102 /** Not really an optimization, removes Confirm nodes. */
103 I_FLAG(remove_confirm , 24, OFF)
105 /** Scalar replacement. */
106 I_FLAG(scalar_replacement , 25, ON)
108 /** Load and Store have only Null exceptions. */
109 I_FLAG(ldst_only_null_ptr_exceptions , 26, ON)
111 /** Sel-based Null-pointer check elimination. */
112 I_FLAG(sel_based_null_check_elim , 27, OFF)
114 /** Automatically create Sync node during construction. */
115 I_FLAG(auto_create_sync , 28, OFF)
117 /** Enable Alias-analysis. */
118 I_FLAG(alias_analysis , 29, ON)
120 /** Closed world assumption. */
121 I_FLAG(closed_world , 31, OFF)