public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r10-10763] rtl-optimization/105559 - avoid quadratic behavior in delete_insn_and_edges
Date: Fri, 27 May 2022 13:15:11 +0000 (GMT)	[thread overview]
Message-ID: <20220527131511.F3BCC395B07A@sourceware.org> (raw)

https://gcc.gnu.org/g:6007449a1c3bd116e431fe53d4dfe2d1c67c1076

commit r10-10763-g6007449a1c3bd116e431fe53d4dfe2d1c67c1076
Author: Richard Biener <rguenther@suse.de>
Date:   Wed May 11 13:34:37 2022 +0200

    rtl-optimization/105559 - avoid quadratic behavior in delete_insn_and_edges
    
    When the insn to delete is a debug insn there's no point in figuring
    out whether it might be the last real insn and thus we have to purge
    dead edges.
    
    2022-05-11  Richard Biener  <rguenther@suse.de>
    
            PR rtl-optimization/105559
            * cfgrtl.c (delete_insn_and_edges): Only perform search to BB_END
            for non-debug insns.
    
    (cherry picked from commit 37a8220fa9188470c677abfef50c1b120c0b6c76)

Diff:
---
 gcc/cfgrtl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 33012ed06b6..9409c5b073f 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -230,7 +230,7 @@ delete_insn_and_edges (rtx_insn *insn)
 {
   bool purge = false;
 
-  if (INSN_P (insn) && BLOCK_FOR_INSN (insn))
+  if (NONDEBUG_INSN_P (insn) && BLOCK_FOR_INSN (insn))
     {
       basic_block bb = BLOCK_FOR_INSN (insn);
       if (BB_END (bb) == insn)


                 reply	other threads:[~2022-05-27 13:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220527131511.F3BCC395B07A@sourceware.org \
    --to=rguenth@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).