public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Julian Brown <julian@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, OpenMP, C/C++] Handle array reference base-pointers in array sections
Date: Thu, 5 May 2022 14:40:38 +0200	[thread overview]
Message-ID: <YnPFxtbeJeXrMh8T@tucnak> (raw)
In-Reply-To: <20220505124629.10ff0d33@squid.athome>

On Thu, May 05, 2022 at 12:46:29PM +0100, Julian Brown wrote:
> All the above (at least) has been done as part of the patch series
> posted here:
> 
> https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591973.html

Ah, ok, so is this patch superseded by that series, or do you want to apply
it just to be removed again?

> > At least for the C FE maybe we'll
> > need to arrange for less folding to be done because C still folds too
> > much stuff prematurely. Then when finishing clauses verify that
> > OMP_ARRAY_SECTION trees appear only where we allow them and not
> > elsewhere (say foo (1, 2, 3)[:36]
> > would be ok if foo returns a pointer, but
> > foo (ptr[0:13], 2, 3)
> > would not) and then need to differentiate between the cases listed in
> > the standard which we handle for each . -> [idx] when starting from a
> > var (in such a case I vaguely recall there are rules for pointer
> > attachments etc.) or other arbitrary expressions (in that case we
> > just evaluate those expressions and e.g. in the foo (1, 2, 3)[:36]
> > case basically do tmp = foo (1, 2, 3);
> > and mapping of tmp[:36].
> 
> ...which also changes/refactors quite a lot regarding how lowering
> clauses into mapping nodes works (the "address inspector" bits).
> "Weird" cases like mapping the return value from functions doesn't
> necessarily DTRT yet -- it wasn't entirely clear how that should/could
> work, I don't think.

I vaguely remember that the ./-/[] handling applies only when it starts
from a variable and as soon as one triggers something else, perhaps
including just *& or similar stuff then only the final lvalue is mapped and
nothing else, but dunno if it is from just discussions about the topic or
what is actually written in the spec, will need to look it up.

	Jakub


  parent reply	other threads:[~2022-05-05 12:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 15:18 Chung-Lin Tang
2022-05-05  8:52 ` Jakub Jelinek
2022-05-05 11:46   ` Julian Brown
2022-05-05 11:46     ` Julian Brown
2022-05-05 12:40     ` Jakub Jelinek [this message]
2022-05-05 15:59       ` Julian Brown

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=YnPFxtbeJeXrMh8T@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=julian@codesourcery.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).