From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 733EF384B0C1; Tue, 21 Apr 2020 09:36:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 733EF384B0C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587461787; bh=PKHNrPszQICdT3RzH4aMkCBYN+K5G8MQ9DE2tDRU6ts=; h=From:To:Subject:Date:From; b=uRBPBUvJyjeEGlI9TrrOG4O5LIYkFGG9tCcBW3Je33d7UpCZGmcu9vNTfRWQVFbo4 /6JOhVGRfsdqgJgXa/FUxiRK1H4JFBCCeK3n1NkVnIi50XAdj1+5gSdI1w4Y28GVqu ffMOg+T9DZjQvG1kKrazgCCOO0GT9NdKoKl7TYeQ= From: "tschwinge at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: unknown X-Bugzilla-Keywords: openacc X-Bugzilla-Severity: enhancement X-Bugzilla-Who: tschwinge at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 09:36:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94684 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 opera= nd" ('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 =3D 1', for example. Could it, or is 'expand_omp_target' too early f= or 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?=