diff options
author | Richard Biener <rguenther@suse.de> | 2022-07-07 15:23:28 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-07-11 12:05:27 +0200 |
commit | 74526710f7f78914e51d4748527cda2d30bbac5c (patch) | |
tree | abcc78610688cb3536bf58f0d2e4b45bb71cb3e3 /gcc/ada | |
parent | 06b2a2abe26554c6f9365676683d67368cbba206 (diff) | |
download | gcc-74526710f7f78914e51d4748527cda2d30bbac5c.zip gcc-74526710f7f78914e51d4748527cda2d30bbac5c.tar.gz gcc-74526710f7f78914e51d4748527cda2d30bbac5c.tar.bz2 |
More update-ssa speedup
When we do TODO_update_ssa_no_phi we already avoid computing
dominance frontiers for all blocks - it is worth to also avoid
walking all dominated blocks in the update domwalk and restrict
the walk to the SEME region with the affected blocks. We can
do that by walking the CFG in reverse from blocks_to_update to
the common immediate dominator, marking blocks in the region
and telling the domwalk to STOP when leaving it.
For an artificial testcase with N adjacent loops with one
unswitching opportunity that takes the incremental SSA updating
off the -ftime-report radar:
tree loop unswitching : 11.25 ( 3%) 0.09 ( 5%) 11.53 ( 3%) 36M ( 9%)
`- tree SSA incremental : 35.74 ( 9%) 0.07 ( 4%) 36.65 ( 9%) 2734k ( 1%)
improves to
tree loop unswitching : 10.21 ( 3%) 0.05 ( 3%) 11.50 ( 3%) 36M ( 9%)
`- tree SSA incremental : 0.66 ( 0%) 0.02 ( 1%) 0.49 ( 0%) 2734k ( 1%)
for less localized updates the SEME region isn't likely constrained
enough so I've restricted the extra work to TODO_update_ssa_no_phi
callers.
* tree-into-ssa.cc (rewrite_mode::REWRITE_UPDATE_REGION): New.
(rewrite_update_dom_walker::rewrite_update_dom_walker): Update.
(rewrite_update_dom_walker::m_in_region_flag): New.
(rewrite_update_dom_walker::before_dom_children): If the region
to update is marked, STOP at exits.
(rewrite_blocks): For REWRITE_UPDATE_REGION mark the region
to be updated.
(dump_update_ssa): Use bitmap_empty_p.
(update_ssa): Likewise. Use REWRITE_UPDATE_REGION when
TODO_update_ssa_no_phi.
* tree-cfgcleanup.cc (cleanup_tree_cfg_noloop): Account
pending update_ssa to the caller.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions