added Id tag
[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 /* $Id$ */
10
11 #ifdef HAVE_CONFIG_H
12 # include <config.h>
13 #endif
14
15
16 /* 0 - don't do this optimization
17    1 - lets see, if there is a better graph */
18 int opt_cse = 1;                    /* Hash the nodes */
19 int opt_constant_folding = 1;       /* Evaluate operations */
20 int opt_unreachable_code = 1;       /* Bad node propagation */
21 int opt_dead_node_elimination = 1;  /* Reclaim memory */
22 int optimized = 1;
23 int opt_inline = 1;
24
25 /* set the flags with set_flagname, get the flag with get_flagname */
26
27 inline void
28 set_opt_cse (int value)
29 {
30   opt_cse = value;
31 }
32
33 inline int
34 get_opt_cse (void)
35 {
36   return opt_cse;
37 }
38
39 inline void
40 set_opt_constant_folding (int value)
41 {
42   opt_constant_folding=value;
43 }
44
45 inline int
46 get_opt_constant_folding (void)
47 {
48   return opt_constant_folding;
49 }
50
51 inline void
52 set_opt_unreachable_code(int value)
53 {
54   opt_unreachable_code = value;
55 }
56
57 inline int
58 get_opt_unreachable_code(void)
59 {
60   return opt_unreachable_code;
61 }
62
63
64 inline void
65 set_opt_dead_node_elimination (int value)
66 {
67   opt_dead_node_elimination = value;
68 }
69
70 inline int
71 get_opt_dead_node_elimination (void)
72 {
73   return opt_dead_node_elimination;
74 }
75
76 inline void
77 set_optimize (int value)
78 {
79   optimized = value;
80 }
81
82 inline int
83 get_optimize (void)
84 {
85   return optimized;
86 }
87
88
89 void set_opt_inline (int value) {
90   opt_inline = value;
91 }
92
93 int  get_opt_inline (void) {
94   return opt_inline;
95 }