Bug 94684 - OpenACC 'async' clause optimizations
Summary: OpenACC 'async' clause optimizations
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 10.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization, openacc
Depends on:
Blocks:
 
Reported: 2020-04-21 09:36 UTC by Thomas Schwinge
Modified: 2020-04-21 10:36 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schwinge 2020-04-21 09:36:27 UTC
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?