- allow_ifconv interface was totally braindamaged. Use a simple and intuitive
[libfirm] / include / libfirm / irflag.h
index f167f92..b1a049d 100644 (file)
@@ -22,7 +22,7 @@
  * @brief   Flags to control optimizations.
  * @author  Christian Schaefer, Goetz Lindenmaier, Michael Beck
  * @version $Id$
- * @summary
+ * @brief
  * Flags to customize the behavior of libfirm.
  *
  * There are the following groups of flags:
@@ -55,29 +55,32 @@ typedef unsigned optimization_state_t;
  * If optimize == 0 no optimizations are performed at all.
  * Default: optimize == 1.
  */
-void set_optimize (int value);
+void set_optimize(int value);
 int  get_optimize(void);
 
 /** Enables/Disables constant folding optimization.
  *
  *  If opt_constant_folding == 1 perform
- *  - constant expression evaluation (2 + 5 ==> 7, 3 < 2 ==> false)
- *  - algebraic simplification  (a * 0 ==> 0, a or a ==> a)
- *  - simplification of tests   ( !(a < b) ==> (a >= b))
+ *  constant expression evaluation (2 + 5 ==> 7, 3 < 2 ==> false)
  * Default: opt_constant_folding == 1.
  */
-void set_opt_constant_folding (int value);
+void set_opt_constant_folding(int value);
 
-/** Enables/Disables output of information about loop unrolling.
+/** Enables/Disables algebraic simplifications.
+ *
+ *  If opt_algebraic_simplification == 1 perform
+ *  - algebraic simplification  (a * 0 ==> 0, a or a ==> a)
+ *  - simplification of tests   ( !(a < b) ==> (a >= b))
+ * Default: opt_algebraic_simplification == 1.
  */
-void set_opt_loop_unrolling_verbose (int value);
+void set_opt_algebraic_simplification(int value);
 
 /** Enables/Disables common subexpression elimination.
  *
  * If opt_cse == 1 perform common subexpression elimination.
  * Default: opt_cse == 1.
  */
-void set_opt_cse (int value);
+void set_opt_cse(int value);
 
 /** Returns constant folding optimization setting. */
 int get_opt_cse(void);
@@ -91,20 +94,7 @@ int get_opt_cse(void);
  * right after a call to local_optimize with global cse turned on.
  * Default: opt_global_cse == 0.
  */
-void set_opt_global_cse (int value);
-
-/** Enables/Disables strength reduction.
- *
- * If opt_strength_red == 1 perform strength reduction.
- * See strenth_red.h.
- *
- * Default: opt_strength_red = 1;
- */
-void set_opt_strength_red (int value);
-
-/** Enables/Disables output of information about strength reduction.
- */
-void set_opt_strength_red_verbose (int value);
+void set_opt_global_cse(int value);
 
 /** Enables/Disables unreachable code elimination.
  *
@@ -140,15 +130,14 @@ void set_opt_control_flow_strong_simplification(int value);
  * If the flag is turned on Sel nodes can be replaced by Const nodes representing
  * the address of a function.
  */
-void set_opt_dyn_meth_dispatch (int value);
-int  get_opt_dyn_meth_dispatch (void);
+void set_opt_dyn_meth_dispatch(int value);
+int  get_opt_dyn_meth_dispatch(void);
 
 /** Enable/Disable type optimization of cast nodes.
  *
  * Controls the optimizations in tropt.h.  Default: on.
  */
-void set_opt_optimize_class_casts (int value);
-void set_opt_optimize_class_casts_verbose (int value);
+void set_opt_optimize_class_casts(int value);
 
 /** Restricts the behavior of cast optimization.
  *
@@ -173,12 +162,6 @@ void set_opt_fragile_ops(int value);
  */
 void set_opt_remove_confirm(int value);
 
-/**
- * Enable/Disable scalar replacement optimization.
- */
-void set_opt_scalar_replacement(int value);
-void set_opt_scalar_replacement_verbose(int value);
-
 /**
  * Enable/Disable Null exception in Load and Store nodes only.
  *
@@ -206,10 +189,21 @@ void set_opt_ldst_only_null_ptr_exceptions(int value);
  * Enabling this flag is meaningless if ldst_non_null_exceptions is
  * enabled.
  *
- * This flags should be set for Java style languages.
+ * This flag should be set for Java style languages.
  */
 void set_opt_sel_based_null_check_elim(int value);
 
+/**
+ * Enable/Disable Global Null Pointer Test Elimination.
+ *
+ * In languages where it is illegal to dereference NULL pointer, doing
+ * so makes the pointer "valid non-null", else the program will stop
+ * anyway by a fault.
+ *
+ * This flag should be set for C style languages.
+ */
+void set_opt_global_null_ptr_elimination(int value);
+
 /**
  * Enable/Disable Automatic construction of Sync nodes during
  * Firm construction.
@@ -217,7 +211,7 @@ void set_opt_sel_based_null_check_elim(int value);
  * If this flags is set, sequential non-volatile Loads are automatically
  * rearranged so that they can be executed in parallel by creating Sync nodes.
  *
- * This flags should be set for Java style languages.
+ * This flag should be set for Java style languages.
  */
 void set_opt_auto_create_sync(int value);
 
@@ -234,7 +228,13 @@ void set_opt_auto_create_sync(int value);
  *
  *  @note ATTENTION: not all such transformations are guarded by a flag.
  */
-void set_opt_normalize (int value);
+void set_opt_normalize(int value);
+
+/**
+ * Enable/Disable ConvB() nodes with a "semantic behavior", i.e. a real
+ * operation that must be executed.
+ */
+void set_opt_allow_conv_b(int value);
 
 /** Enable/Disable precise exception context.
  *