On Tue, Jan 24, 2023 at 01:37:07PM +0100, Richard Biener wrote:
> 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.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, it's a border-line
> regression and the following doesn't really avoid the deep recursion
> but instead cleans up the CFG before eventually doing it.

Not very happy with adding extra argument to 110 callers of this function,
but guess we can live with it.

Ok.

>       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.

        Jakub

Reply via email to