]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
OpenACC: Remove 'acc_async_test' -> skip shortcut in 'libgomp/oacc-async.c:goacc_wait'
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 24 Feb 2023 15:17:57 +0000 (16:17 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 10 Mar 2023 14:43:58 +0000 (15:43 +0100)
We're not taking such a shortcut anywhere else, and (with future changes) it
has potential to confuse things if synchronization in a libgomp plugin happens
to have side effects even if an async queue currently is empty.

libgomp/
* oacc-async.c (goacc_wait): Remove 'acc_async_test' -> skip
shortcut.

(cherry picked from commit b5037d4a073f2e4625afab5ec1f35624d9f9eba1)

libgomp/ChangeLog.omp
libgomp/oacc-async.c

index 402b14311a8513524a427f06312cbdea5b623108..da11f40651f96ac41fc63b3a220d69caf0ad4ccc 100644 (file)
@@ -3,6 +3,12 @@
        Backported from master:
        2023-03-10  Thomas Schwinge  <thomas@codesourcery.com>
 
+       * oacc-async.c (goacc_wait): Remove 'acc_async_test' -> skip
+       shortcut.
+
+       Backported from master:
+       2023-03-10  Thomas Schwinge  <thomas@codesourcery.com>
+
        * testsuite/libgomp.oacc-c-c++-common/data-3.c: Document/verify
        another aspect of OpenACC 'async' semantics.
 
index 026df3c941795d2d4bfd6213be50d52616cf3ef1..b00f45d5754b730f8b888f10a145d0eeba61f9aa 100644 (file)
@@ -410,9 +410,6 @@ goacc_wait (int async, int num_waits, va_list *ap)
          break;
        }
 
-      if (acc_async_test (qid))
-       continue;
-
       if (async == acc_async_sync)
        acc_wait (qid);
       else if (qid == async)