X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fopt_inline.c;h=7f0998b6d1a61e95b1e0a6e62f876ec6eb8e63c7;hb=dd4cd761ab637d4488c7e29f49843b1b02366acf;hp=2bf5d8ff2e671ebf7aec1f31173ebfcb5956fd2e;hpb=28e7b9ad610c6cdf23e8523649a0ae09e3e9e03e;p=libfirm diff --git a/ir/opt/opt_inline.c b/ir/opt/opt_inline.c index 2bf5d8ff2..7f0998b6d 100644 --- a/ir/opt/opt_inline.c +++ b/ir/opt/opt_inline.c @@ -2039,8 +2039,9 @@ static void maybe_push_call(pqueue_t *pqueue, call_entry *call, DB((dbg, LEVEL_2, "In %+F Call %+F to %+F has benefice %d\n", get_irn_irg(call->call), call->call, callee, benefice)); - if (benefice < inline_threshold && prop != irg_inline_forbidden) + if (prop < irg_inline_forced && benefice < inline_threshold) { return; + } pqueue_put(pqueue, call, benefice); } @@ -2273,22 +2274,18 @@ void inline_functions(unsigned maxsize, int inline_threshold) { 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)) {