diff options
author | Richard Biener <rguenther@suse.de> | 2022-06-29 14:55:43 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-06-30 10:39:09 +0200 |
commit | aea329432b8e405668861bbe0cd2662a80508c45 (patch) | |
tree | 19a869a65d1062f7bab9be2fbd2efbc45d501ef1 /gcc/domwalk.cc | |
parent | 721aa2cc44d143e49a704bc8238b3d0d5f750a49 (diff) | |
download | gcc-aea329432b8e405668861bbe0cd2662a80508c45.zip gcc-aea329432b8e405668861bbe0cd2662a80508c45.tar.gz gcc-aea329432b8e405668861bbe0cd2662a80508c45.tar.bz2 |
Avoid computing RPO for update_ssa
At some point when domwalk got the ability to use RPO for ordering
dominator children we carefully avoided update_ssa eating the cost
of RPO compute. Unfortunately some later consolidation of CTORs
lost this again so the following makes this explicit via a special
value to the bb_index_to_rpo argument of domwalk, speeding up
update_ssa again.
* domwalk.h (dom_walker::dom_walker): Update comment to
reflect reality and new special argument value for
bb_index_to_rpo.
* domwalk.cc (dom_walker::dom_walker): Recognize -1
bb_index_to_rpo.
* tree-into-ssa.cc
(rewrite_update_dom_walker::rewrite_update_dom_walker): Tell
dom_walker to not use RPO.
Diffstat (limited to 'gcc/domwalk.cc')
-rw-r--r-- | gcc/domwalk.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/domwalk.cc b/gcc/domwalk.cc index d633088..e36e9eb 100644 --- a/gcc/domwalk.cc +++ b/gcc/domwalk.cc @@ -191,7 +191,8 @@ dom_walker::dom_walker (cdi_direction direction, m_reachability (reachability), m_user_bb_to_rpo (bb_index_to_rpo != NULL), m_unreachable_dom (NULL), - m_bb_to_rpo (bb_index_to_rpo) + m_bb_to_rpo (bb_index_to_rpo == (int *)(uintptr_t)-1 + ? NULL : bb_index_to_rpo) { } @@ -272,7 +273,8 @@ void dom_walker::walk (basic_block bb) { /* Compute the basic-block index to RPO mapping lazily. */ - if (!m_bb_to_rpo + if (!m_user_bb_to_rpo + && !m_bb_to_rpo && m_dom_direction == CDI_DOMINATORS) { int *postorder = XNEWVEC (int, n_basic_blocks_for_fn (cfun)); |