* If opt_algebraic_simplification == 1 perform
* - algebraic simplification (a * 0 ==> 0, a or a ==> a)
* - simplification of tests ( !(a < b) ==> (a >= b))
- * Default: opt_constant_folding == 1.
+ * Default: opt_algebraic_simplification == 1.
*/
void set_opt_algebraic_simplification(int value);
*/
void set_opt_global_cse(int value);
+/** Enables/Disables usage of combo algorithm.
+ *
+ * If opt_combo == 1 perform combo optimization
+ * instead of combinations of optimiza_graph_df()/
+ * optimize_graph_cf()
+ * Default: opt_combo == 1.
+ */
+void set_opt_combo(int value);
+
/** Enables/Disables strength reduction.
*
* If opt_strength_red == 1 perform strength reduction.
/*
* We have 3 kinds of flags:
- * I_FLAGS are INTERNAL flags: The is only a public set_opt_<flag> function
+ * I_FLAGS are INTERNAL flags: There is only a public set_opt_<flag> function
* E_FLAGS are EXTERNAL flags: Public get_opt_<flag> and set_opt_<flag> fucntions exists
* R_FLAGS are RUNNING flags: Use only internally in libfirm to indicate running states
*/
/** Algebraic simplifications. */
I_FLAG(algebraic_simplification , 8, ON)
+/** Use combo instead of df/cf optimizations. */
+I_FLAG(combo , 9, ON)
+
/** Remove dynamic method dispatch. */
E_FLAG(dyn_meth_dispatch , 11, ON)
env = get_irg_link(irg);
if (env->got_inline) {
/* this irg got calls inlined: optimize it */
-
- if (0) {
- /* scalar replacement does not work well with Tuple nodes, so optimize them away */
- optimize_graph_df(irg);
-
+ if (get_opt_combo()) {
+ if (env->local_vars) {
+ scalar_replacement_opt(irg);
+ }
+ combo(irg);
+ } else {
if (env->local_vars) {
if (scalar_replacement_opt(irg)) {
optimize_graph_df(irg);
}
}
optimize_cf(irg);
- } else {
- if (env->local_vars) {
- scalar_replacement_opt(irg);
- }
- combo(irg);
}
}
if (env->got_inline || (env->n_callers_orig != env->n_callers)) {