For nvptx offloading, make sure to emit C++ constructor, destructor aliases [PR97106] (was: [committed][nvptx] Use .alias directive for mptx >= 6.3)

2025-04-16 Thread Thomas Schwinge
letions(-) diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc index 28da43ca740..d1e25b99701 100644 --- a/gcc/config/nvptx/nvptx.cc +++ b/gcc/config/nvptx/nvptx.cc @@ -7789,6 +7789,18 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree name, #endif cgraph_node *cnode = cg

Re: [committed][nvptx] Use .alias directive for mptx >= 6.3

2025-03-25 Thread Thomas Schwinge
Hi Tom! On 2022-03-22T14:41:46+0100, Tom de Vries via Gcc-patches wrote: > Starting with ptx isa version 6.3, a ptx directive .alias is available. Regarding the following item specifically: > Unreferenced aliases are not emitted (these can occur f.i. when inlining a > call to an alias). This

Re: [committed][nvptx] Use .alias directive for mptx >= 6.3

2025-03-25 Thread Tom de Vries
On 3/25/25 11:18, Thomas Schwinge wrote: Hi Tom! On 2022-03-22T14:41:46+0100, Tom de Vries via Gcc-patches wrote: Starting with ptx isa version 6.3, a ptx directive .alias is available. Regarding the following item specifically: Unreferenced aliases are not emitted (these can occur f.i. w

Add 'g++.target/nvptx/alias-g++.dg_init_dtor2-1.C' (was: Enhance 'gcc.target/nvptx/alias-*.c' assembler scanning (was: [committed][nvptx] Use .alias directive for mptx >= 6.3))

2024-09-05 Thread Thomas Schwinge
Hi! On 2024-09-05T14:39:46+0200, I wrote: > On 2024-09-05T14:36:54+0200, I wrote: >> On 2022-03-22T14:41:46+0100, Tom de Vries via Gcc-patches >> wrote: >>> [nvptx] Use .alias directive for mptx >= 6.3 >> >>> --- a/gcc/config/nvptx/nvptx.cc >>> +++ b/gcc/config/nvptx/nvptx.cc >> >>> @@ -968,7 +9

Enhance 'gcc.target/nvptx/alias-*.c' assembler scanning (was: [committed][nvptx] Use .alias directive for mptx >= 6.3)

2024-09-05 Thread Thomas Schwinge
Hi! On 2024-09-05T14:36:54+0200, I wrote: > On 2022-03-22T14:41:46+0100, Tom de Vries via Gcc-patches > wrote: >> [nvptx] Use .alias directive for mptx >= 6.3 > >> --- a/gcc/config/nvptx/nvptx.cc >> +++ b/gcc/config/nvptx/nvptx.cc > >> @@ -968,7 +969,8 @@ static void >> write_fn_proto_1 (std::s

Re: [committed][nvptx] Use .alias directive for mptx >= 6.3

2024-09-05 Thread Thomas Schwinge
Hi! On 2022-03-22T14:41:46+0100, Tom de Vries via Gcc-patches wrote: > Starting with ptx isa version 6.3, a ptx directive .alias is available. > Use this directive to support symbol aliases, as far as possible. > The alias support has the following [and more] limitations. > Aliases to aliases

Fix 'gcc.target/nvptx/alias-2.c' comment (was: [committed][nvptx] Use .alias directive for mptx >= 6.3)

2024-09-05 Thread Thomas Schwinge
Hi! On 2022-03-22T14:41:46+0100, Tom de Vries via Gcc-patches wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/nvptx/alias-1.c > @@ -0,0 +1,27 @@ > +[...] > +int v; > + > +void __f () > +{ > + v = 1; > +} > + > +void f () __attribute__ ((alias ("__f"))); > + > +int > +main (void) > +{ >

nvptx 'TARGET_USE_LOCAL_THUNK_ALIAS_P', 'TARGET_SUPPORTS_ALIASES' (was: [committed][nvptx] Use .alias directive for mptx >= 6.3)

2023-09-12 Thread Thomas Schwinge
Hi! On 2022-12-02T12:24:58+0100, I wrote: > On 2022-03-22T14:41:46+0100, Tom de Vries via Gcc-patches > wrote: >> Starting with ptx isa version 6.3, a ptx directive .alias is available. >> Use this directive to support symbol aliases, as far as possible. >> >> The alias support is off by default

Re: [committed][nvptx] Use .alias directive for mptx >= 6.3

2022-12-02 Thread Thomas Schwinge
Hi Tom! (My following analysis and WIP patch is from a few months ago, but I thought I'd send it now, in case you've got any comments, and to avoid potential duplicate work.) On 2022-03-22T14:41:46+0100, Tom de Vries via Gcc-patches wrote: > Starting with ptx isa version 6.3, a ptx directive .

[committed][nvptx] Use .alias directive for mptx >= 6.3

2022-03-22 Thread Tom de Vries via Gcc-patches
Hi, Starting with ptx isa version 6.3, a ptx directive .alias is available. Use this directive to support symbol aliases, as far as possible. The alias support is off by default. It can be turned on using a switch -malias. Furthermore, for pre-sm_75, it's not effective unless the ptx version is