From: Iain Sandoe <idsandoe@googlemail.com>
To: Richard Biener <rguenther@suse.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] tree-optimization/105679 - disable backward threading of unlikely entry
Date: Sun, 31 Jul 2022 20:17:36 +0100 [thread overview]
Message-ID: <B6F657D2-2544-452A-9615-D9A7DC997153@googlemail.com> (raw)
In-Reply-To: <20220729085417.4B50F13A1B@imap2.suse-dmz.suse.de>
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 …
thanks
Iain
--------
In file included from /src-local/gcc-master/gcc/hash-table.h:248,
from /src-local/gcc-master/gcc/coretypes.h:486,
from /src-local/gcc-master/gcc/tree-ssa-threadbackward.cc:22:
In member function ‘T& vec<T, A, vl_embed>::operator[](unsigned int) [with T = basic_block_def*; A = va_heap]’,
inlined from ‘const T& vec<T>::operator[](unsigned int) const [with T = basic_block_def*]’ at /src-local/gcc-master/gcc/vec.h:1486:20,
inlined from ‘bool back_threader_profitability::profitable_path_p(const vec<basic_block_def*>&, tree, edge, bool*)’ at /src-local/gcc-master/gcc/tree-ssa-threadbackward.cc:781:37:
/src-local/gcc-master/gcc/vec.h:890:19: warning: array subscript 4294967294 is above array bounds of ‘basic_block_def* [1]’ [-Warray-bounds]
890 | return m_vecdata[ix];
| ~~~~~~~~~^
/src-local/gcc-master/gcc/vec.h: In member function ‘bool back_threader_profitability::profitable_path_p(const vec<basic_block_def*>&, tree, edge, bool*)’:
/src-local/gcc-master/gcc/vec.h:635:5: note: while referencing ‘vec<basic_block_def*, va_heap, vl_embed>::m_vecdata’
635 | T m_vecdata[1];
| ^~~~~~~~~
=====
next prev parent reply other threads:[~2022-07-31 19:17 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 [this message]
2022-08-01 1:23 ` Jeff Law
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=B6F657D2-2544-452A-9615-D9A7DC997153@googlemail.com \
--to=idsandoe@googlemail.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).