]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/108500 - avoid useless fast-query compute in CFG cleanup
authorRichard Biener <rguenther@suse.de>
Tue, 24 Jan 2023 09:49:18 +0000 (10:49 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 24 Jan 2023 14:29:17 +0000 (15:29 +0100)
commitf31fa9ea35ebcf221a2abaacba5511225f5d036e
tree0e7da00770611f268fca937e237226cd166694f4
parent9f0cb3368af735e95776769c4f28fa9cbb60eaf8
tree-optimization/108500 - avoid useless fast-query compute in CFG cleanup

CFG cleanup computes dominators before the loop over blocks looking
for merging opportunities.  That computes also the fast-query DFS
numbers but that's a bit pointless since any CFG cleanup will invalidate
them immediately (they are re-computed before fixing up loops).
The following avoids this and fixes the SIGSEGV due to the deep
recursion in assign_dfs_numbers after inlining very many small
functions.

PR tree-optimization/108500
* dominance.h (calculate_dominance_info): Add parameter
to indicate fast-query compute, defaulted to true.
* dominance.cc (calculate_dominance_info): Honor
fast-query compute parameter.
* tree-cfgcleanup.cc (cleanup_tree_cfg_noloop): Do
not compute the dominator fast-query DFS numbers.
gcc/dominance.cc
gcc/dominance.h
gcc/tree-cfgcleanup.cc