aboutsummaryrefslogtreecommitdiff
path: root/gcc/errors.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2021-10-27 18:22:29 +0200
committerAldy Hernandez <aldyh@redhat.com>2021-10-27 20:14:15 +0200
commit2f0b6a971a051f6e687a15dd2fa4bf431381e551 (patch)
treeff9f20c2ee36c0d5398bb95632b3f3296049de75 /gcc/errors.c
parent9f4edfc1fb80211f8663f978b7144e7e9d9df743 (diff)
downloadgcc-2f0b6a971a051f6e687a15dd2fa4bf431381e551.zip
gcc-2f0b6a971a051f6e687a15dd2fa4bf431381e551.tar.gz
gcc-2f0b6a971a051f6e687a15dd2fa4bf431381e551.tar.bz2
Reorder relation calculating code in the path solver.
Enabling the fully resolving threader triggers various relation ordering issues that have previously been dormant because the VRP hybrid threader (forward threader based) never gives us long enough paths for this to matter. The new threader spares no punches in finding non-obvious paths, so getting the relations right is paramount. This patch fixes a couple oversights that have gone undetected. First, some background. There are 3 types of relations along a path: a) Relations inherent in a PHI. b) Relations as a side-effect of evaluating a statement. c) Outgoing relations between blocks in a path. We must calculate these in their proper order, otherwise we can run into ordering issues. The current ordering is wrong, as we precalculate PHIs for _all_ blocks before anything else, and then proceed to register the relations throughout the path. Also, we fail to realize that a PHI whose argument is also defined in the PHIs block cannot be registered as an equivalence without causing more ordering issues. This patch fixes all the problems described above. With it we get a handful more net threads, but most importantly, we disallow some threads that were wrong. Tested on x86-64 and ppc64le Linux on the usual regstrap, plus by comparing the different thread counts before and after this patch. gcc/ChangeLog: * gimple-range-fold.cc (fold_using_range::range_of_range_op): Dump operands as well as relation. * gimple-range-path.cc (path_range_query::compute_ranges_in_block): Compute PHI relations first. Compute outgoing relations at the end. (path_range_query::compute_ranges): Remove call to compute_relations. (path_range_query::compute_relations): Remove. (path_range_query::maybe_register_phi_relation): New. (path_range_query::compute_phi_relations): Abstract out registering one PHI relation to... (path_range_query::compute_outgoing_relations): ...here. * gimple-range-path.h (class path_range_query): Remove compute_relations. Add maybe_register_phi_relation.
Diffstat (limited to 'gcc/errors.c')
0 files changed, 0 insertions, 0 deletions