public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/97008] [openacc] Remove invariant that IFN_UNIQUE is last stmt in bb
Date: Mon, 05 Oct 2020 08:52:26 +0000	[thread overview]
Message-ID: <bug-97008-4-w2MDOJnmov@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97008-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
I did a libgomp test run with commit f96b6328fa7 "[tree-optimization] Don't
clear ctrl-altering flag for IFN_UNIQUE" reverted, and with this patch:
...
diff --git a/gcc/tracer.c b/gcc/tracer.c
index 0f69b335b8c..3a4403d92b1 100644
--- a/gcc/tracer.c
+++ b/gcc/tracer.c
@@ -93,11 +93,15 @@ can_duplicate_insn_p (gimple *g)
      The IFN_GOMP_SIMT_VOTE_ANY is currently part of such a group,
      so the same holds there, but it could be argued that the
      IFN_GOMP_SIMT_VOTE_ANY could be generated after that group,
-     in which case it could be duplicated.  */
+     in which case it could be duplicated.
+     An IFN_UNIQUE call must be duplicated as part of its group,
+     or not at all.  */
   if (is_gimple_call (g)
       && (gimple_call_internal_p (g, IFN_GOMP_SIMT_ENTER_ALLOC)
          || gimple_call_internal_p (g, IFN_GOMP_SIMT_EXIT)
-         || gimple_call_internal_p (g, IFN_GOMP_SIMT_VOTE_ANY)))
+         || gimple_call_internal_p (g, IFN_GOMP_SIMT_VOTE_ANY)
+         || (gimple_call_internal_p (g)
+             && gimple_call_internal_unique_p (g))))
     return false;

   return true;
@@ -117,8 +121,6 @@ can_duplicate_bb_no_insn_iter_p (const_basic_block bb)
       if (gimple_code (g) == GIMPLE_TRANSACTION)
        return false;

-      /* An IFN_UNIQUE call must be duplicated as part of its group,
-        or not at all.  */
       if (is_gimple_call (g)
          && gimple_call_internal_p (g)
          && gimple_call_internal_unique_p (g))
...

No issues found.

  parent reply	other threads:[~2020-10-05  8:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 11:08 [Bug tree-optimization/97008] New: " vries at gcc dot gnu.org
2020-09-10 12:22 ` [Bug tree-optimization/97008] " rguenth at gcc dot gnu.org
2020-09-10 12:34 ` vries at gcc dot gnu.org
2020-09-10 12:47 ` rguenth at gcc dot gnu.org
2020-10-05  8:52 ` vries at gcc dot gnu.org [this message]
2020-10-06  8:02 ` vries at gcc dot gnu.org

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-97008-4-w2MDOJnmov@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).