public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] tree-optimization/108500 - avoid useless fast-query compute in CFG cleanup
Date: Tue, 24 Jan 2023 13:53:55 +0100	[thread overview]
Message-ID: <Y8/U49YYNnwDqGhu@tucnak> (raw)
In-Reply-To: <20230124123707.D802C139FB@imap2.suse-dmz.suse.de>

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	other threads:[~2023-01-24 12:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 12:37 Richard Biener
2023-01-24 12:53 ` Jakub Jelinek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y8/U49YYNnwDqGhu@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).