]> git.ipfire.org Git - thirdparty/gcc.git/commit
Improve compute_control_dep_chain path finding
authorRichard Biener <rguenther@suse.de>
Thu, 25 Aug 2022 11:04:43 +0000 (13:04 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 26 Aug 2022 06:23:50 +0000 (08:23 +0200)
commit670961f051aedbac21bc769c21c5b28b338b6003
tree01f4bc58600b452dbf3018fedf321ceed652531c
parent8b4d528d8c57ad7a2d5e39427bf4af7b8c1668c3
Improve compute_control_dep_chain path finding

This improves the compute_control_dep_chain path finding by first
marking the dominating region we search and then making sure to
not walk outside if it when enumerating all paths from the dominating
block to the interesting PHI edge source.  I have limited the DFS
walk done for the marking in similar ways as we limit the walking
in compute_control_dep_chain, more careful limiting might be
necessary though - the --param uninit-control-dep-attempts param
I re-use has a rather high default of 1000 which we might be able
to reduce with this patch as well (I think we'll usually hit some of the
other limits before ever reaching this).

* gimple-predicate-analysis.cc (dfs_mark_dominating_region):
New helper.
(compute_control_dep_chain): Adjust to honor marked region
if provided.
(uninit_analysis::init_from_phi_def): Pre-mark the dominating
region to improve compute_control_dep_chain walking.
* vec.h (vec<T, va_heap, vl_ptr>::allocated): Add forwarder.
gcc/gimple-predicate-analysis.cc
gcc/vec.h