diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-08-17 17:47:21 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-08-17 20:14:02 +0200 |
commit | 5adfb6540db95da5faf1f77fbe9ec38b4cf8eb1f (patch) | |
tree | 0548abb2f313400f6b67235d22559949b4ae6b76 /gcc/value-relation.cc | |
parent | 6c136d53e89e32fe9d22e41e5df89c08d3470049 (diff) | |
download | gcc-5adfb6540db95da5faf1f77fbe9ec38b4cf8eb1f.zip gcc-5adfb6540db95da5faf1f77fbe9ec38b4cf8eb1f.tar.gz gcc-5adfb6540db95da5faf1f77fbe9ec38b4cf8eb1f.tar.bz2 |
Reset root oracle from path_oracle::reset_path.
When we cross a backedge in the path solver, we reset the path
relations and nuke the root oracle. However, we forget to reset it
for the next path. This is causing us to miss threads because
subsequent paths will have no root oracle to use.
With this patch we get 201 more threads in the threadfull passes in my
.ii files and 118 more overall (DOM gets less because threadfull runs
before).
Normally, I'd recommend this for the GCC 12 branch, but considering
how sensitive other passes are to jump threading, and that there is no
PR associated with this, perhaps we should leave this out. Up to the
release maintainers of course.
gcc/ChangeLog:
* gimple-range-path.cc
(path_range_query::compute_ranges_in_block): Remove
set_root_oracle call.
(path_range_query::compute_ranges): Pass ranger oracle to
reset_path.
* value-relation.cc (path_oracle::reset_path): Set root oracle.
* value-relation.h (path_oracle::reset_path): Add root oracle
argument.
Diffstat (limited to 'gcc/value-relation.cc')
-rw-r--r-- | gcc/value-relation.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/value-relation.cc b/gcc/value-relation.cc index 3f0957c..7fc22d3 100644 --- a/gcc/value-relation.cc +++ b/gcc/value-relation.cc @@ -1513,11 +1513,13 @@ path_oracle::query_relation (basic_block bb, tree ssa1, tree ssa2) return query_relation (bb, equiv_1, equiv_2); } -// Reset any relations registered on this path. +// Reset any relations registered on this path. ORACLE is the root +// oracle to use. void -path_oracle::reset_path () +path_oracle::reset_path (relation_oracle *oracle) { + set_root_oracle (oracle); m_equiv.m_next = NULL; bitmap_clear (m_equiv.m_names); m_relations.m_head = NULL; |