diff options
author | Richard Biener <rguenther@suse.de> | 2022-08-05 12:51:43 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-08-05 14:32:40 +0200 |
commit | 6ca948264d67d4079b5868342257aee79259e301 (patch) | |
tree | 371ae1076bfc1d35ae08a0dd117156086600c2fb | |
parent | 47964e766270f349f5b171bcd68ff7c1e60d85d8 (diff) |
backthreader dump fixlinaro-local/ci/tcwg_kernel/gnu-master-arm-stable-allmodconfig
This fixes odd SUCCEEDED dumps from the backthreader registry that
can happen even though register_jump_thread cancelled the thread
as invalid.
* tree-ssa-threadbackward.cc (back_threader::maybe_register_path):
Check whether the registry register_path rejected the path.
(back_threader_registry::register_path): Return whether
register_jump_thread succeeded.
-rw-r--r-- | gcc/tree-ssa-threadbackward.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-ssa-threadbackward.cc b/gcc/tree-ssa-threadbackward.cc index 3acd66a7780..332a1d2a1dd 100644 --- a/gcc/tree-ssa-threadbackward.cc +++ b/gcc/tree-ssa-threadbackward.cc @@ -243,10 +243,9 @@ back_threader::maybe_register_path () bool irreducible = false; if (m_profit.profitable_path_p (m_path, m_name, taken_edge, &irreducible) - && debug_counter ()) + && debug_counter () + && m_registry.register_path (m_path, taken_edge)) { - m_registry.register_path (m_path, taken_edge); - if (irreducible) vect_free_loop_info_assumptions (m_path[0]->loop_father); } @@ -858,8 +857,7 @@ back_threader_registry::register_path (const vec<basic_block> &m_path, } push_edge (jump_thread_path, taken_edge, EDGE_NO_COPY_SRC_BLOCK); - register_jump_thread (jump_thread_path); - return true; + return register_jump_thread (jump_thread_path); } // Thread all suitable paths in the current function. |