2 * Copyright (C) 1995-2008 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, Sebastian Hack
28 * We have 3 kinds of flags:
29 * I_FLAGS are INTERNAL flags: There is only a public set_opt_<flag> function
30 * E_FLAGS are EXTERNAL flags: Public get_opt_<flag> and set_opt_<flag> fucntions exists
31 * R_FLAGS are RUNNING flags: Use only internally in libfirm to indicate running states
34 /** Turn off all optimizations. */
35 I_FLAG(optimize , 0, ON)
37 /** Common subexpression eliminations: Hash the nodes. */
40 /** Don't use block predecessor for comparison.
41 * Default must be zero as code placement must
42 * be run right after a local optimize walk with
44 I_FLAG(global_cse , 2, OFF)
46 /** Evaluate operations. */
47 I_FLAG(constant_folding , 3, ON)
49 /** Bad node propagation. */
50 I_FLAG(unreachable_code , 4, ON)
52 /** Algebraic simplifications. */
53 I_FLAG(algebraic_simplification , 5, ON)
55 /** Use Global Null Pointer Test elimination. */
56 I_FLAG(global_null_ptr_elimination , 6, ON)
58 /** Remove dynamic method dispatch. */
59 E_FLAG(dyn_meth_dispatch , 7, ON)
61 /** Optimize cast nodes. */
62 E_FLAG(suppress_downcast_optimization , 8, OFF)
64 /** Load and Store have only Null exceptions. */
65 I_FLAG(ldst_only_null_ptr_exceptions , 9, ON)
67 /** Sel-based Null-pointer check elimination. */
68 I_FLAG(sel_based_null_check_elim , 10, OFF)
70 /** Automatically create Sync node during construction. */
71 I_FLAG(auto_create_sync , 11, OFF)
73 /** Enable Alias-analysis. */
74 I_FLAG(alias_analysis , 12, ON)
76 /** Closed world assumption. */
77 I_FLAG(closed_world , 13, OFF)
79 /* -------------------- RUNNING flags ------------------- */
81 /** This flag is set while the reassociation optimizations are running */