public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop
Date: Mon, 19 Feb 2024 13:58:17 +0000	[thread overview]
Message-ID: <bug-110528-4-doYxQWYxuO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110528-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|2023-07-03 00:00:00         |2024-02-19
     Ever confirmed|0                           |1

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with -O2 -gstatement-frontiers -fselective-scheduling2 (but oddly not
-O2 -g -fselective-scheduling2).

Samples: 4K of event 'cycles:u', Event count (approx.): 5647511948              
Overhead       Samples  Command  Shared Object     Symbol                       
  20.82%           901  cc1      cc1               [.] moveup_expr_cached
  10.45%           446  cc1      cc1               [.]
schedule_expr_on_boundary
   7.60%           328  cc1      cc1               [.] is_ineligible_successor
   7.56%           327  cc1      cc1               [.] bitmap_bit_p
   7.30%           315  cc1      cc1               [.] sel_bb_head

possibly because of

/* Same as moveup_expr, but first looks up the result of
   transformation in caches.  */
static enum MOVEUP_EXPR_CODE
moveup_expr_cached (expr_t expr, insn_t insn, bool inside_insn_group)
{
...
  if (DEBUG_INSN_P (EXPR_INSN_RTX (expr))
      && BLOCK_FOR_INSN (EXPR_INSN_RTX (expr))
      && (sel_bb_head (BLOCK_FOR_INSN (EXPR_INSN_RTX (expr)))
          == EXPR_INSN_RTX (expr)))
    /* Don't use cached information for debug insns that are heads of
       basic blocks.  */;

and likely -gstatement-frontiers puts debug insns right there.

It reads like a band-aid fix for a compare-debug issue that was then traded
for this compile-time one ...

      parent reply	other threads:[~2024-02-19 13:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  5:47 [Bug c/110528] New: Timeout with with specific optimizations 19373742 at buaa dot edu.cn
2023-07-03  5:48 ` [Bug c/110528] " 19373742 at buaa dot edu.cn
2023-07-03  5:58 ` [Bug middle-end/110528] " pinskia at gcc dot gnu.org
2023-07-03  7:16 ` rguenth at gcc dot gnu.org
2023-07-03  8:37 ` 19373742 at buaa dot edu.cn
2023-07-03  8:42 ` pinskia at gcc dot gnu.org
2023-07-03 22:04 ` [Bug rtl-optimization/110528] selective scheduling seems to go into an infinite loop pinskia at gcc dot gnu.org
2023-07-04  0:23 ` pinskia at gcc dot gnu.org
2023-07-04  0:29 ` pinskia at gcc dot gnu.org
2024-02-19 13:58 ` rguenth at gcc dot gnu.org [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=bug-110528-4-doYxQWYxuO@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).