aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadbackward.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2021-10-14 16:15:04 +0200
committerAldy Hernandez <aldyh@redhat.com>2021-10-14 23:37:59 +0200
commit0bd68793921ecf3bb5654252dea3763fd127ab77 (patch)
tree4c58121ffca0be17044780f2151ef6b64cb0a1f2 /gcc/tree-ssa-threadbackward.c
parentd71e1be7c3a3e2058d1243e6a090e421c9fd7f85 (diff)
downloadgcc-0bd68793921ecf3bb5654252dea3763fd127ab77.zip
gcc-0bd68793921ecf3bb5654252dea3763fd127ab77.tar.gz
gcc-0bd68793921ecf3bb5654252dea3763fd127ab77.tar.bz2
Cleanup --params for backward threader.
The new backward threader makes some of the --param knobs used to control it questionable at best or no longer applicable at worst. The fsm-maximum-phi-arguments param is unused and can be removed. The max-fsm-thread-length param is block based which is a bit redundant, since we already restrict paths based on instruction estimates. The max-fsm-thread-paths restricts the total number of threadable paths in a function. We probably don't need this. Besides, the forward threader has no such restriction. Tested on x86-64 Linux. gcc/ChangeLog: * doc/invoke.texi: Remove max-fsm-thread-length, max-fsm-thread-paths, and fsm-maximum-phi-arguments. * params.opt: Same. * tree-ssa-threadbackward.c (back_threader::back_threader): Remove argument. (back_threader_registry::back_threader_registry): Same. (back_threader_profitability::profitable_path_p): Remove param_max_fsm_thread-length. (back_threader_registry::register_path): Remove m_max_allowable_paths.
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r--gcc/tree-ssa-threadbackward.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c
index 1999ccf..7c2c111 100644
--- a/gcc/tree-ssa-threadbackward.c
+++ b/gcc/tree-ssa-threadbackward.c
@@ -52,12 +52,11 @@ along with GCC; see the file COPYING3. If not see
class back_threader_registry
{
public:
- back_threader_registry (int max_allowable_paths);
+ back_threader_registry ();
bool register_path (const vec<basic_block> &, edge taken);
bool thread_through_all_blocks (bool may_peel_loop_headers);
private:
back_jt_path_registry m_lowlevel_registry;
- const int m_max_allowable_paths;
int m_threaded_paths;
};
@@ -120,8 +119,7 @@ private:
const edge back_threader::UNREACHABLE_EDGE = (edge) -1;
back_threader::back_threader (bool speed_p)
- : m_registry (param_max_fsm_thread_paths),
- m_profit (speed_p),
+ : m_profit (speed_p),
m_solver (m_ranger, /*resolve=*/false)
{
m_last_stmt = NULL;
@@ -547,8 +545,7 @@ back_threader::debug ()
dump (stderr);
}
-back_threader_registry::back_threader_registry (int max_allowable_paths)
- : m_max_allowable_paths (max_allowable_paths)
+back_threader_registry::back_threader_registry ()
{
m_threaded_paths = 0;
}
@@ -594,15 +591,6 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path,
if (m_path.length () <= 1)
return false;
- if (m_path.length () > (unsigned) param_max_fsm_thread_length)
- {
- if (dump_file && (dump_flags & TDF_DETAILS))
- 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;
- }
-
int n_insns = 0;
gimple_stmt_iterator gsi;
loop_p loop = m_path[0]->loop_father;
@@ -885,15 +873,6 @@ bool
back_threader_registry::register_path (const vec<basic_block> &m_path,
edge taken_edge)
{
- if (m_threaded_paths > m_max_allowable_paths)
- {
- if (dump_file && (dump_flags & TDF_DETAILS))
- 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;
- }
-
vec<jump_thread_edge *> *jump_thread_path
= m_lowlevel_registry.allocate_thread_path ();