diff options
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r-- | gcc/tree-ssa-threadbackward.c | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c index 7ff5cec..805b7ac 100644 --- a/gcc/tree-ssa-threadbackward.c +++ b/gcc/tree-ssa-threadbackward.c @@ -593,7 +593,7 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path, if (m_path.length () > (unsigned) param_max_fsm_thread_length) { if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " FAIL: FSM jump-thread path not considered: " + fprintf (dump_file, " FAIL: Jump-thread path not considered: " "the number of basic blocks on the path " "exceeds PARAM_MAX_FSM_THREAD_LENGTH.\n"); return false; @@ -768,7 +768,7 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path, if (path_crosses_loops) { if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " FAIL: FSM jump-thread path not considered: " + fprintf (dump_file, " FAIL: Jump-thread path not considered: " "the path crosses loops.\n"); return false; } @@ -784,7 +784,7 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path, if (n_insns >= param_max_fsm_thread_path_insns) { if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " FAIL: FSM jump-thread path not considered: " + fprintf (dump_file, " FAIL: Jump-thread path not considered: " "the number of instructions on the path " "exceeds PARAM_MAX_FSM_THREAD_PATH_INSNS.\n"); return false; @@ -793,7 +793,7 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path, else if (!m_speed_p && n_insns > 1) { if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " FAIL: FSM jump-thread path not considered: " + fprintf (dump_file, " FAIL: Jump-thread path not considered: " "duplication of %i insns is needed and optimizing for size.\n", n_insns); return false; @@ -818,25 +818,22 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path, { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, - " FAIL: FSM would create irreducible loop without threading " + " FAIL: Would create irreducible loop without threading " "multiway branch.\n"); return false; } - /* If this path does not thread through the loop latch, then we are - using the FSM threader to find old style jump threads. This - is good, except the FSM threader does not re-use an existing - threading path to reduce code duplication. - - So for that case, drastically reduce the number of statements - we are allowed to copy. */ + /* The generic copier used by the backthreader does not re-use an + existing threading path to reduce code duplication. So for that + case, drastically reduce the number of statements we are allowed + to copy. */ if (!(threaded_through_latch && threaded_multiway_branch) && (n_insns * param_fsm_scale_path_stmts >= param_max_jump_thread_duplication_stmts)) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, - " FAIL: FSM did not thread around loop and would copy too " + " FAIL: Did not thread around loop and would copy too " "many statements.\n"); return false; } @@ -849,7 +846,7 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path, { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, - " FAIL: FSM Thread through multiway branch without threading " + " FAIL: Thread through multiway branch without threading " "a multiway branch.\n"); return false; } @@ -865,7 +862,7 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path, { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, - " FAIL: FSM Thread through latch before loop opts would create non-empty latch\n"); + " FAIL: Thread through latch before loop opts would create non-empty latch\n"); return false; } @@ -887,8 +884,8 @@ back_threader_registry::register_path (const vec<basic_block> &m_path, if (m_threaded_paths > m_max_allowable_paths) { if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " FAIL: FSM jump-thread path not considered: " - "the number of previously recorded FSM paths to " + fprintf (dump_file, " FAIL: Jump-thread path not considered: " + "the number of previously recorded paths to " "thread exceeds PARAM_MAX_FSM_THREAD_PATHS.\n"); return false; } @@ -896,7 +893,8 @@ back_threader_registry::register_path (const vec<basic_block> &m_path, vec<jump_thread_edge *> *jump_thread_path = m_lowlevel_registry.allocate_thread_path (); - /* Record the edges between the blocks in PATH. */ + // The generic copier ignores the edge type. We can build the + // thread edges with any type. for (unsigned int j = 0; j + 1 < m_path.length (); j++) { basic_block bb1 = m_path[m_path.length () - j - 1]; @@ -905,11 +903,10 @@ back_threader_registry::register_path (const vec<basic_block> &m_path, edge e = find_edge (bb1, bb2); gcc_assert (e); jump_thread_edge *x - = m_lowlevel_registry.allocate_thread_edge (e, EDGE_FSM_THREAD); + = m_lowlevel_registry.allocate_thread_edge (e, EDGE_COPY_SRC_BLOCK); jump_thread_path->safe_push (x); } - /* Add the edge taken when the control variable has value ARG. */ jump_thread_edge *x = m_lowlevel_registry.allocate_thread_edge (taken_edge, EDGE_NO_COPY_SRC_BLOCK); |