Changes to avoid compiler warnings.
[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 optimized = 1;                  /* Turn off all optimizations */
19
20 int opt_cse = 1;                    /* Hash the nodes */
21 int opt_global_cse = 0;             /* Don't use block predecessor for comparison */
22 /* @@@ 0 solage code placement fehlt */
23 int opt_constant_folding = 1;       /* Evaluate operations */
24 int opt_unreachable_code = 1;       /* Bad node propagation */
25 int opt_control_flow = 1;           /* control flow optimizations. */
26 int opt_dead_node_elimination = 1;  /* Reclaim memory */
27 int opt_reassociation = 1;          /* Reassociate nodes */
28 int opt_inline = 1;                 /* Do inlining transformation */
29
30 /* set the flags with set_flagname, get the flag with get_flagname */
31 inline void
32 set_opt_cse (int value)
33 {
34   opt_cse = value;
35 }
36
37 inline int
38 get_opt_cse (void)
39 {
40   return opt_cse;
41 }
42
43 void set_opt_global_cse (int value)
44 {
45   opt_global_cse = value;
46 }
47
48 int  get_opt_global_cse (void)
49 {
50   return opt_global_cse;
51 }
52
53 inline void
54 set_opt_constant_folding (int value)
55 {
56   opt_constant_folding=value;
57 }
58
59 inline int
60 get_opt_constant_folding (void)
61 {
62   return opt_constant_folding;
63 }
64
65 inline void
66 set_opt_unreachable_code(int value)
67 {
68   opt_unreachable_code = value;
69 }
70
71 inline int
72 get_opt_unreachable_code(void)
73 {
74   return opt_unreachable_code;
75 }
76
77 inline void set_opt_control_flow(int value) {
78   opt_control_flow = value;
79 }
80
81 inline int  get_opt_control_flow(void) {
82   return opt_control_flow;
83 }
84
85 inline void
86 set_opt_reassociation(int value)
87 {
88   opt_reassociation = value;
89 }
90
91 inline int
92 get_opt_reassociation(void)
93 {
94   return opt_reassociation;
95 }
96
97 inline void
98 set_opt_dead_node_elimination (int value)
99 {
100   opt_dead_node_elimination = value;
101 }
102
103 inline int
104 get_opt_dead_node_elimination (void)
105 {
106   return opt_dead_node_elimination;
107 }
108
109 inline void
110 set_optimize (int value)
111 {
112   optimized = value;
113 }
114
115 inline int
116 get_optimize (void)
117 {
118   return optimized;
119 }
120
121
122 void set_opt_inline (int value) {
123   opt_inline = value;
124 }
125
126 int  get_opt_inline (void) {
127   return opt_inline;
128 }