New directory: ana for analyses. Adapted configure/makefiles
[libfirm] / ir / ir / irflag.h
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
3 **
4 ** Authors: Christian Schaefer
5 **
6 ** irflag --- optimization flags
7 */
8
9 /* $Id$ */
10
11 #ifndef _IRFLAG_H_
12 #define _IRFLAG_H_
13
14 /* If optimize == 0 no optimizations are performed.
15    Default: optimize == 1. */
16 void set_optimize (int value);
17 int  get_optimize (void);
18
19 /* If opt_constant_folding == 1 perform
20     - constant expression evaluation (2 + 5 ==> 7, 3 < 2 ==> false)
21     - algebraic simplification  (a * 0 ==> 0, a or a ==> a)
22     - simplification of tests   ( !(a < b) ==> (a >= b))
23     - merging single exit with single entry blocks
24     - unreachable code elimination
25     - refining the memory representation
26     - remove store after load
27    Default: opt_constant_folding == 1. */
28 void set_opt_constant_folding (int value);
29 int  get_opt_constant_folding (void);
30
31 /* If opt_cse == 1 perform constant subexpression elimination.
32    Default: opt_cse == 1. */
33 void set_opt_cse (int value);
34 int  get_opt_cse (void);
35
36 /* If opt_global_cse == 1 and opt_cse == 1 perform intra procedure
37    constant subexpression elimination for floating nodes.  Intra
38    procedure cse gets the graph into state "floating".  It is necessary
39    to run pre/code motion to get the graph back into state "pinned".
40    Default: opt_global_cse == 1. */
41 void set_opt_global_cse (int value);
42 int  get_opt_global_cse (void);
43
44 /* If opt_unreachable_code == 1 replace nodes (except Block,
45    Phi and Tuple) with a Bad predecessor by the Bad node.
46    Default: opt_unreachable_code == 1. */
47 inline void set_opt_unreachable_code(int value);
48 inline int  get_opt_unreachable_code(void);
49
50 /* If opt_reassociation == 1 reassociation is performed.
51    Default: opt_reassociation == 1. */
52 inline void set_opt_reassociation(int value);
53 inline int  get_opt_reassociation(void);
54
55 /* If opt_dead_node_elimination == 1 deallocate all dead nodes
56    by copying the firm graph.
57    Default: opt_dead_node_elimination == 0.  @@@ as buggy, else 1. */
58 void set_opt_dead_node_elimination (int value);
59 int  get_opt_dead_node_elimination (void);
60
61 /* If opt_inline == 1 the inlining transformation is performed. */
62 void set_opt_inline (int value);
63 int  get_opt_inline (void);
64
65 #endif