public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch] LTO: Fix writing of toplevel asm with offloading [PR109816]
Date: Fri, 12 May 2023 13:10:05 +0000 (UTC)	[thread overview]
Message-ID: <nycvar.YFH.7.77.849.2305121309090.4723@jbgna.fhfr.qr> (raw)
In-Reply-To: <74555a9a-8eb8-14ac-a5bd-d0ab15c9acc1@codesourcery.com>

On Fri, 12 May 2023, Tobias Burnus wrote:

> Long standing issue but as top-level 'asm' statement were rare, it did not
> show up.
> However, the fix for PR108969 in commit r14-321-g9a41d2cdbcd added code
> 
> +#elif defined(_GLIBCXX_SYMVER_GNU)
> +  __extension__ __asm (".globl _ZSt21ios_base_library_initv");
> q
> libstdc++-v3/include/std/iostream. This was then duly written by the
> offloading-device
> lto1 for digestion by the device-target assembler. While the llvm-mc linker
> user by
> GCN did accept .globl, nvptx's ptxas did choke on it.
> 
> Additionally, as the assembly was already written for offloading, the output
> was
> lost on the host when using LTO for not only for offload but for real (i.e.
> with -flto).
> 
> Has someone an idea how to check whether the offloading-code assembler does
> not
> contain the _ZSt21ios_base_library_initv while the host-side (before or after
> LTO)
> should contain it, but only with _GLIBCXX_SYMVER_GNU?
> Otherwise, the testcase tests only and at least whether it breaks with nvptx
> as ptxas does not like the symbol.
> 
> * * *
> 
> Tested (manually + running the OvO and sollve-testsuite) on x86-64-gnu-linux
> with nvptx
> offloading and with "make check -k" on x86-64-gnu-linux, albeit without
> offloading configured.
> The installed-build regtesting of "make check-target-libgomp" seems to be
> currently broken
> as it does run all checking code (check_effective_target...) but does not seem
> to find
> any actual testcase to be run, probably a side effect of the recent testsuite
> changes.
> 
> OK for mainline and GCC 13?

Without any idea about the details above the patch looks quite reasonable,
thus OK for trunk.  OK for branch after a while if no issues showed up.

Thanks,
Richard.

  reply	other threads:[~2023-05-12 13:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 12:46 Tobias Burnus
2023-05-12 13:10 ` Richard Biener [this message]
2023-05-13  9:18 ` Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.77.849.2305121309090.4723@jbgna.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).