From: Richard Biener <rguenther@suse.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] tree-optimization/111294 - backwards threader PHI costing
Date: Mon, 18 Sep 2023 07:51:11 +0000 (UTC) [thread overview]
Message-ID: <nycvar.YFH.7.77.849.2309180750580.5561@jbgna.fhfr.qr> (raw)
In-Reply-To: <ZQf47oRoNlrJ5Pcx@tucnak>
On Mon, 18 Sep 2023, Jakub Jelinek wrote:
> On Thu, Sep 14, 2023 at 01:23:13PM +0000, Richard Biener via Gcc-patches wrote:
> > diff --git a/libgomp/team.c b/libgomp/team.c
> > index 54dfca8080a..e5a86de1dd0 100644
> > --- a/libgomp/team.c
> > +++ b/libgomp/team.c
> > @@ -756,8 +756,9 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
> > attr = &thread_attr;
> > }
> >
> > - start_data = gomp_alloca (sizeof (struct gomp_thread_start_data)
> > - * (nthreads - i));
> > + if (i < nthreads)
> > + start_data = gomp_alloca (sizeof (struct gomp_thread_start_data)
> > + * (nthreads - i));
> >
> > /* Launch new threads. */
> > for (; i < nthreads; ++i)
>
> Wouldn't just
> if (i >= nthreads)
> __builtin_unreachable ();
> do the trick as well?
I'll check and adjust to that if possible.
Richard.
> I'd prefer not to add further runtime checks here if possible.
>
> Jakub
>
>
--
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)
next prev parent reply other threads:[~2023-09-18 7:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230914132321.E17B13858C2B@sourceware.org>
2023-09-18 7:14 ` Jakub Jelinek
2023-09-18 7:51 ` Richard Biener [this message]
[not found] <20230914132331.8D7613858CDA@sourceware.org>
2023-09-17 17:50 ` Jeff Law
2023-09-14 13:23 Richard Biener
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=nycvar.YFH.7.77.849.2309180750580.5561@jbgna.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/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).