public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/94684] New: OpenACC 'async' clause optimizations
Date: Tue, 21 Apr 2020 09:36:27 +0000	[thread overview]
Message-ID: <bug-94684-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 94684
           Summary: OpenACC 'async' clause optimizations
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: enhancement
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
  Target Milestone: ---

In 'gcc/omp-expand.c:expand_omp_target', we have an optimization that for an
OpenACC 'async' clause, we try to "pack the async arg in to the tag's operand"
('i_async' handling).

(... which doesn't seem to have any dedicated testsuite coverage.)

That currently only works for 'INTEGER_CST' literals, but not for 'const int
async = 1', for example.  Could it, or is 'expand_omp_target' too early for
such things?

Due to only accepting positive values, this doesn't work for the very common
case of 'async' clause without argument, that is: 'async(acc_async_noval)',
that is: 'async(-1)'.

And, couldn't we also optimize the (unusual) case of 'async(acc_async_sync)',
that is: 'async(-2)' by removing the 'async' clause altogether?

                 reply	other threads:[~2020-04-21  9:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-94684-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).