diff options
Diffstat (limited to 'gcc/tree-ssa-threadbackward.cc')
-rw-r--r-- | gcc/tree-ssa-threadbackward.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gcc/tree-ssa-threadbackward.cc b/gcc/tree-ssa-threadbackward.cc index 8a64535..fcbb95b 100644 --- a/gcc/tree-ssa-threadbackward.cc +++ b/gcc/tree-ssa-threadbackward.cc @@ -868,22 +868,18 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path, a multiway branch, in which case we have deemed it worth losing other loop optimizations later. - We also consider it worth creating an irreducible inner loop if - the number of copied statement is low relative to the length of - the path -- in that case there's little the traditional loop - optimizer would have done anyway, so an irreducible loop is not - so bad. */ + We also consider it worth creating an irreducible inner loop after + loop optimizations if the number of copied statement is low. */ if (!m_threaded_multiway_branch && *creates_irreducible_loop - && (m_n_insns * (unsigned) param_fsm_scale_path_stmts - > (m_path.length () * - (unsigned) param_fsm_scale_path_blocks))) - + && (!(cfun->curr_properties & PROP_loop_opts_done) + || (m_n_insns * param_fsm_scale_path_stmts + >= param_max_jump_thread_duplication_stmts))) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, - " FAIL: Would create irreducible loop without threading " - "multiway branch.\n"); + " FAIL: Would create irreducible loop early without " + "threading multiway branch.\n"); /* We compute creates_irreducible_loop only late. */ return false; } |