Addded method to replace in array os a node in irnode
[libfirm] / ir / ir / irflag.c
index 3ab4c92..44fd13e 100644 (file)
@@ -6,59 +6,88 @@
 ** irflag --- optimization flags
 */
 
-# include "irflag.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 
 /* 0 - don't do this optimization
    1 - lets see, if there is a better graph */
-int opt_cse = 1;
-int opt_constant_folding = 1;
-int opt_dead_node_elimination = 0;
+int opt_cse = 1;                    /* Hash the nodes */
+int opt_constant_folding = 1;       /* Evaluate operations */
+int opt_unreachable_code = 1;       /* Bad node propagation */
+int opt_dead_node_elimination = 1;  /* Reclaim memory */
 int optimized = 1;
+int opt_inline = 1;
 
 /* set the flags with set_flagname, get the flag with get_flagname */
 
-void
+inline void
 set_opt_cse (int value)
 {
   opt_cse = value;
 }
 
-int
+inline int
 get_opt_cse (void)
 {
   return opt_cse;
 }
 
-void
+inline void
 set_opt_constant_folding (int value)
 {
   opt_constant_folding=value;
 }
 
-int
+inline int
 get_opt_constant_folding (void)
 {
   return opt_constant_folding;
 }
 
-void set_opt_dead_node_elimination (int value)
+inline void
+set_opt_unreachable_code(int value)
 {
-  opt_dead_node_elimination=value;
+  opt_unreachable_code = value;
 }
 
-int  get_opt_dead_node_elimination (void)
+inline int
+get_opt_unreachable_code(void)
+{
+  return opt_unreachable_code;
+}
+
+
+inline void
+set_opt_dead_node_elimination (int value)
+{
+  opt_dead_node_elimination = value;
+}
+
+inline int
+get_opt_dead_node_elimination (void)
 {
   return opt_dead_node_elimination;
 }
 
-void
+inline void
 set_optimize (int value)
 {
   optimized = value;
 }
 
-int
+inline int
 get_optimize (void)
 {
   return optimized;
 }
+
+
+void set_opt_inline (int value) {
+  opt_inline = value;
+}
+
+int  get_opt_inline (void) {
+  return opt_inline;
+}