CVS:
[libfirm] / ir / ir / irflag.c
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
10 /* 0 - don't do this optimization
11    1 - lets see, if there is a better graph */
12 int opt_cse = 1;
13 int opt_constant_folding = 1;
14 int opt_dead_node_elimination = 1;
15 int optimized = 1;
16
17 /* set the flags with set_flagname, get the flag with get_flagname */
18
19 inline void
20 set_opt_cse (int value)
21 {
22   opt_cse = value;
23 }
24
25 inline int
26 get_opt_cse (void)
27 {
28   return opt_cse;
29 }
30
31 inline void
32 set_opt_constant_folding (int value)
33 {
34   opt_constant_folding=value;
35 }
36
37 inline int
38 get_opt_constant_folding (void)
39 {
40   return opt_constant_folding;
41 }
42
43 inline void
44 set_opt_dead_node_elimination (int value)
45 {
46   opt_dead_node_elimination = value;
47 }
48
49 inline int
50 get_opt_dead_node_elimination (void)
51 {
52   return opt_dead_node_elimination;
53 }
54
55 inline void
56 set_optimize (int value)
57 {
58   optimized = value;
59 }
60
61 inline int
62 get_optimize (void)
63 {
64   return optimized;
65 }