public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/106752] New: [OpenMP] reverse offload – avoid emitting 'nohost' variant on the host / cleanup
@ 2022-08-26 10:26 burnus at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2022-08-26 10:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106752
Bug ID: 106752
Summary: [OpenMP] reverse offload – avoid emitting 'nohost'
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-26 10:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 10:26 [Bug middle-end/106752] New: [OpenMP] reverse offload – avoid emitting 'nohost' variant on the host / cleanup burnus at gcc dot gnu.org
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).