public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] tree-optimization/105679 - disable backward threading of unlikely entry
Date: Sun, 31 Jul 2022 19:23:16 -0600	[thread overview]
Message-ID: <f4281b7f-aeae-0ace-3a6a-eac81eacf6c3@gmail.com> (raw)
In-Reply-To: <B6F657D2-2544-452A-9615-D9A7DC997153@googlemail.com>



On 7/31/2022 1:17 PM, Iain Sandoe via Gcc-patches wrote:
> Hi Richi,
>
>> On 29 Jul 2022, at 09:54, Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
>>
>> The following makes the backward threader reject threads whose entry
>> edge is probably never executed according to the profile.  That in
>> particular, for the testcase, avoids threading the irq == 1 check
>> on the path where irq > 31, thereby avoiding spurious -Warray-bounds
>> diagnostics
> This breaks bootstrap on i686-darwin{9,17} with what looks like a valid  warning (werrors on stage2)
>
> cc1plus  … -O2 -Wall … is enough to.
>
> I can repeat it on a cross from x86_64-darwin19, so I can probably reduce the .ii (it’s like 2M5 raw) and file a PR if you like - depends if the solution might be obvious to you …
I suspect what's happening here is by suppressing the jump thread we're 
leaving an unexecutable path through the CFG in the IL.   The warning is 
likely on that unexecutable path or at a join point where the 
unexecutable path re-joins the main path through the CFG.

Jeff


  reply	other threads:[~2022-08-01  1:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29  8:54 Richard Biener
2022-07-29 11:43 ` Aldy Hernandez
2022-07-29 12:21   ` Richard Biener
2022-07-30 15:38 ` Jeff Law
2022-07-31 19:17 ` Iain Sandoe
2022-08-01  1:23   ` Jeff Law [this message]
2022-08-01  8:21   ` Richard Biener
2022-08-01  8:33     ` Iain Sandoe

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=f4281b7f-aeae-0ace-3a6a-eac81eacf6c3@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@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).