add global_null_ptr_elimination flag
[libfirm] / ir / ir / irflag_t.def
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
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.
10  *
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.
14  *
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
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief     Definitions for optimisation flags
23  * @author    Michael Beck, Sebastian Hack
24  * @version   $Id$
25  */
26
27 /*
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
32  */
33
34 /** Turn off all optimizations. */
35 I_FLAG(optimize                           , 0, ON)
36
37 /** Common subexpression eliminations: Hash the nodes. */
38 E_FLAG(cse                                , 1, ON)
39
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
43  *  global_cse on. */
44 I_FLAG(global_cse                         , 2, OFF)
45
46 /** Evaluate operations. */
47 I_FLAG(constant_folding                   , 3, ON)
48
49 /** Bad node propagation. */
50 I_FLAG(unreachable_code                   , 4, ON)
51
52 /** */
53 I_FLAG(control_flow_straightening         , 5, ON)
54
55 /** */
56 I_FLAG(control_flow_weak_simplification   , 6, ON)
57
58 /** */
59 I_FLAG(control_flow_strong_simplification , 7, ON)
60
61 /** Algebraic simplifications. */
62 I_FLAG(algebraic_simplification           , 8, ON)
63
64 /** Use combo instead of df/cf optimizations. */
65 I_FLAG(combo                              , 9, ON)
66
67 /** Use Global Null Pointer Test elimination. */
68 I_FLAG(global_null_ptr_elimination        , 10, ON)
69
70 /** Remove dynamic method dispatch. */
71 E_FLAG(dyn_meth_dispatch                  , 11, ON)
72
73 /** Transformations that normalize the firm representation
74  *  as removing Ids and Tuples, useless Phis, SymConst(id) -> Const(entity) ...
75  */
76 I_FLAG(normalize                          , 12, ON)
77
78 /** precise exception context */
79 I_FLAG(precise_exc_context                , 15, ON)
80
81 /** Do Strength reduction */
82 I_FLAG(strength_red                       , 17, ON)
83
84 /** Optimize Fragile OPs */
85 I_FLAG(fragile_ops                        , 19, OFF)
86
87 /** Optimize cast nodes. */
88 E_FLAG(optimize_class_casts               , 21, ON)
89 E_FLAG(suppress_downcast_optimization     , 22, OFF)
90
91 /** Not really an optimization, removes Confirm nodes. */
92 I_FLAG(remove_confirm                     , 23, OFF)
93
94 /** Scalar replacement. */
95 I_FLAG(scalar_replacement                 , 24, ON)
96
97 /** Load and Store have only Null exceptions. */
98 I_FLAG(ldst_only_null_ptr_exceptions      , 25, ON)
99
100 /** Sel-based Null-pointer check elimination. */
101 I_FLAG(sel_based_null_check_elim          , 26, OFF)
102
103 /** Automatically create Sync node during construction. */
104 I_FLAG(auto_create_sync                   , 27, OFF)
105
106 /** Enable Alias-analysis. */
107 I_FLAG(alias_analysis                     , 28, ON)
108
109 /** Closed world assumption. */
110 I_FLAG(closed_world                       , 31, OFF)
111
112 /* -------------------- RUNNING flags ------------------- */
113
114 /** This flag is set while the reassociation optimizations are running */
115 R_FLAG(reassoc                            , 0)
116
117 /** This flag is set while architecture dependent optimizations are running */
118 R_FLAG(arch_dep                           , 0)