From aea329432b8e405668861bbe0cd2662a80508c45 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 29 Jun 2022 14:55:43 +0200 Subject: 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. --- gcc/domwalk.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/domwalk.h') diff --git a/gcc/domwalk.h b/gcc/domwalk.h index 17ddc1b..b71d294 100644 --- a/gcc/domwalk.h +++ b/gcc/domwalk.h @@ -62,8 +62,9 @@ public: /* You can provide a mapping of basic-block index to RPO if you have that readily available or you do multiple walks. If you - specify NULL as BB_INDEX_TO_RPO dominator children will not be - walked in RPO order. */ + specify NULL as BB_INDEX_TO_RPO this mapping will be computed + lazily at walk time. If you specify -1 dominator children will + not be walked in RPO order. */ dom_walker (cdi_direction direction, enum reachability = ALL_BLOCKS, int *bb_index_to_rpo = NULL); -- cgit v1.1