aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.cc
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-01-20 10:28:26 +0100
committerAldy Hernandez <aldyh@redhat.com>2022-01-21 11:19:07 +0100
commiteb5ee6464809e051e0292471597931a660485658 (patch)
tree6c6e3f240670f06d426fed1c8da1266618a4415d /gcc/cp/class.cc
parentc2d9159717b474f9c06dde4d32b48b87164deb50 (diff)
downloadgcc-eb5ee6464809e051e0292471597931a660485658.zip
gcc-eb5ee6464809e051e0292471597931a660485658.tar.gz
gcc-eb5ee6464809e051e0292471597931a660485658.tar.bz2
Reset relations when crossing backedges.
As discussed in PR103721, the problem here is that we are crossing a backedge and causing us to use relations from a previous iteration of a loop. This handles the testcases in both PR103721 and PR104067 which are variants of the same thing. Tested on x86-64 Linux with the usual regstrap as well as verifying the thread count before and after the patch. The number of threads is reduced by a miniscule amount. gcc/ChangeLog: PR tree-optimization/103721 * gimple-range-path.cc (path_range_query::relations_may_be_invalidated): New. (path_range_query::compute_ranges_in_block): Reset relations if they may be invalidated. (path_range_query::maybe_register_phi_relation): Exit if relations may be invalidated on incoming edge. (path_range_query::compute_phi_relations): Pass incoming PHI edge to maybe_register_phi_relation. * gimple-range-path.h (relations_may_be_invalidated): New. (maybe_register_phi_relation): Pass edge instead of tree. * tree-ssa-threadbackward.cc (back_threader::back_threader): Mark DFS edges. * value-relation.cc (path_oracle::path_oracle): Call mark_dfs_back_edges. (path_oracle::register_relation): Add SSA names to m_registered bitmap. (path_oracle::reset_path): Clear m_registered bitmap. * value-relation.h (path_oracle::set_root_oracle): New. gcc/testsuite/ChangeLog: * gcc.dg/pr103721-2.c: New test. * gcc.dg/pr103721.c: New test.
Diffstat (limited to 'gcc/cp/class.cc')
0 files changed, 0 insertions, 0 deletions