public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: "stefansf at linux dot ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-rust@gcc.gnu.org
Subject: [Bug middle-end/108102] rust bootstrap comparison failure on s390x-linux-gnu
Date: Mon, 30 Jan 2023 14:39:47 +0000	[thread overview]
Message-ID: <bug-108102-35322-CFrc2bCtYQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108102-35322@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> ---
The culprit seems to be that s390_sched_init is not called in one particular
case. We have the following basic blocks and edges:

6 --> 12 --> 13 --> 14

The edges from 12 to 13 and 13 to 14 are fall-through edges which means in
function s390_sched_init we "inherit" last_scheduled_unit_distance from the
previous block, i.e., we do not zero it. The edge from 6 to 12 is a
non-fall-through edge which means if we schedule bb 12, then s390_sched_init
will be called and last_scheduled_unit_distance will be zeroed. The culprit
seems to be that bb 12 is empty if no debug information is generated or in case
debug information is generated then it contains only debug insns. Thus, in the
non-debug case when bb 12 is empty it is never scheduled and therefore
s390_sched_init is never called and therefore last_scheduled_unit_distance is
never zeroed. We also see this once inspecting last_scheduled_unit_distance at
the very beginning of function schedule_block for bb 13 where we have:

non-debug: 2 2 0 2 34 0 34 29
    debug: 0 0 0 0 0 0 0 0

In the debug-case we "inherit" for bb 13 from bb 12
last_scheduled_unit_distance which got cleared once bb 12 was scheduled. In the
non-debug case we also "inherit" the array but it did not get cleared in bb 12
because it was never scheduled.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-01-30 14:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 16:22 [Bug rust/108102] New: " doko at gcc dot gnu.org
2022-12-14 16:22 ` [Bug rust/108102] " doko at gcc dot gnu.org
2022-12-14 17:00 ` jakub at gcc dot gnu.org
2022-12-15 10:20 ` marxin at gcc dot gnu.org
2022-12-23 18:27 ` stefansf at linux dot ibm.com
2022-12-23 18:30 ` [Bug middle-end/108102] " pinskia at gcc dot gnu.org
2022-12-23 18:33 ` pinskia at gcc dot gnu.org
2022-12-23 20:58 ` stefansf at linux dot ibm.com
2022-12-23 21:06 ` pinskia at gcc dot gnu.org
2022-12-24 10:05 ` stefansf at linux dot ibm.com
2022-12-24 10:07 ` stefansf at linux dot ibm.com
2023-01-16  9:43 ` stefansf at linux dot ibm.com
2023-01-16  9:44 ` stefansf at linux dot ibm.com
2023-01-16  9:45 ` stefansf at linux dot ibm.com
2023-01-16  9:46 ` stefansf at linux dot ibm.com
2023-01-30 14:39 ` stefansf at linux dot ibm.com [this message]
2023-02-07 10:17 ` doko at gcc dot gnu.org
2023-02-07 10:28 ` stefansf at linux dot ibm.com
2023-02-13 14:33 ` cvs-commit at gcc dot gnu.org
2023-02-13 15:50 ` stefansf at linux dot ibm.com

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-108102-35322-CFrc2bCtYQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-rust@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).