Addded method to replace in array os a node in irnode
[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 #ifndef _IRFLAG_H_
10 #define _IRFLAG_H_
11
12 /* If optimize == 0 no optimizations are performed.
13    Default: optimize == 1. */
14 void set_optimize (int value);
15 int  get_optimize (void);
16
17 /* If opt_constant_folding == 1 perform
18     - constant expression evaluation (2 + 5 ==> 7, 3 < 2 ==> false)
19     - algebraic simplification  (a * 0 ==> 0, a or a ==> a)
20     - simplification of tests   ( !(a < b) ==> (a >= b))
21     - merging single exit with single entry blocks
22     - unreachable code elimination
23     - refining the memory representation
24     - remove store after load
25    Default: opt_constant_folding == 1. */
26 void set_opt_constant_folding (int value);
27 int  get_opt_constant_folding (void);
28
29 /* If opt_cse == 1 perfor constant subexpression elimination
30    (and, if implemented, global code motion.  @@@ Right now
31    cse only within blocks.
32    Default: opt_cse == 1. */
33 void set_opt_cse (int value);
34 int  get_opt_cse (void);
35
36 /* If opt_unreachable_code == 1 replace nodes (except Block,
37    Phi and Tuple) with a Bad predecessor by the Bad node.
38    Default: opt_unreachable_code == 1. */
39 inline void set_opt_unreachable_code(int value);
40 inline int  get_opt_unreachable_code(void);
41
42 /* If opt_dead_node_elimination == 1 deallocate all dead nodes
43    by copying the firm graph.
44    Default: opt_dead_node_elimination == 0.  @@@ as buggy, else 1. */
45 void set_opt_dead_node_elimination (int value);
46 int  get_opt_dead_node_elimination (void);
47
48 /* If opt_inline == 1 the inlining transformation is performed. */
49 void set_opt_inline (int value);
50 int  get_opt_inline (void);
51
52 #endif