diff options
author | Richard Biener <rguenther@suse.de> | 2022-08-25 13:04:43 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-08-26 08:23:50 +0200 |
commit | 670961f051aedbac21bc769c21c5b28b338b6003 (patch) | |
tree | 01f4bc58600b452dbf3018fedf321ceed652531c /gcc/vec.h | |
parent | 8b4d528d8c57ad7a2d5e39427bf4af7b8c1668c3 (diff) | |
download | gcc-670961f051aedbac21bc769c21c5b28b338b6003.zip gcc-670961f051aedbac21bc769c21c5b28b338b6003.tar.gz gcc-670961f051aedbac21bc769c21c5b28b338b6003.tar.bz2 |
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.
Diffstat (limited to 'gcc/vec.h')
-rw-r--r-- | gcc/vec.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1469,6 +1469,9 @@ public: bool is_empty (void) const { return m_vec ? m_vec->is_empty () : true; } + unsigned allocated (void) const + { return m_vec ? m_vec->allocated () : 0; } + unsigned length (void) const { return m_vec ? m_vec->length () : 0; } |