From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69D613858413; Fri, 26 Aug 2022 10:26:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69D613858413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661509575; bh=swBFohJjuBI4l7xm8PLM318MGGrG+Rqd3SEvTsdl1Vk=; h=From:To:Subject:Date:From; b=s+U3eySH0mpdThBrlUNh/vOVdtd3ifsPtjkEeRyF0wnvfP9mqxmLoj9He7eoWFaAH ebm5yndwSNK0w6l+z88hZJ7IBTWVqMDysZGTlnjuAS8JmfGKtwWQR3GHvEOCkw9oYw LemSei+uh6i7u96bwm2O3RC4wHbxV1sVEIy6aavw= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBtaWRkbGUtZW5kLzEwNjc1Ml0gTmV3OiBbT3Blbk1QXSBy?= =?UTF-8?B?ZXZlcnNlIG9mZmxvYWQg4oCTIGF2b2lkIGVtaXR0aW5nICdub2hvc3QnIHZh?= =?UTF-8?B?cmlhbnQgb24gdGhlIGhvc3QgLyBjbGVhbnVw?= Date: Fri, 26 Aug 2022 10:26:14 +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: 13.0 X-Bugzilla-Keywords: missed-optimization, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106752 Bug ID: 106752 Summary: [OpenMP] reverse offload =E2=80=93 avoid emitting 'noho= st' variant on the host / cleanup Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: missed-optimization, openmp Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- For reverse offload, GCC generates a <...>._omp_fn.0.nohost function on all devices and on the host it also generates <...>._omp_fn.0 However, the 'nohost' version is not used on the host and could be removed. (Cleanup + size optimization.) - Or in other words: (Pre-remark: DECL_IGNORE_P is set in omp-expand.cc's expand_omp_target while the quote below is from omp-offload.cc execute_omp_device_lower.) >From https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600387.html: > + case IFN_GOMP_TARGET_REV: ... > + /* FIXME: Find a way to actually prevent outputting the empty-body > + old_decl as debug symbol + function in the assembly file. */ The debug stuff ought to be through DECL_IGNORED_P on the FUNCTION_DECL. If you want it set just on one side and clear on the other side, perhaps set or clear it during lto streaming it in in offload lto1? As for emitting it, perhaps turning it into an external declaration from definition afterwards? Cf. also original patch: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598662.html albeit the longer description is in https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598654.html This patch was committed as r13-2218.=