aboutsummaryrefslogtreecommitdiff
path: root/gcc/vec.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-08-25 13:04:43 +0200
committerRichard Biener <rguenther@suse.de>2022-08-26 08:23:50 +0200
commit670961f051aedbac21bc769c21c5b28b338b6003 (patch)
tree01f4bc58600b452dbf3018fedf321ceed652531c /gcc/vec.h
parent8b4d528d8c57ad7a2d5e39427bf4af7b8c1668c3 (diff)
downloadgcc-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/vec.h b/gcc/vec.h
index eed075a..d048fa5 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -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; }