public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] c++: Add target hook for emit_support_tinfos [PR108883]
@ 2023-02-23 10:23 Jakub Jelinek
  2023-02-27 23:26 ` Jason Merrill
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2023-02-23 10:23 UTC (permalink / raw)
  To: Jason Merrill, Jonathan Wakely; +Cc: gcc-patches

Hi!

_Float16 and decltype(0.0bf16) types are on x86 supported only with
-msse2.  On x86_64 that is the default, but on ia32 it is not.
We should still emit fundamental type tinfo for those types in
libsupc++.a/libstdc++.*, regardless of whether libsupc++/libstdc++
is compiled with -msse2 or not, as user programs can be compiled
with different ISA flags from libsupc++/libstdc++ and if they
are compiled with -msse2 and use std::float16_t or std::bfloat16_t
and need RTTI for it, it should work out of the box.  Furthermore,
libstdc++ ABI on ia32 shouldn't depend on whether the library
is compiled with -mno-sse or -msse2.

Unfortunately, just hacking up libsupc++ Makefile/configure so that
a single source is compiled with -msse2 isn't appropriate, because
that TU emits also code and the code should be able to run on CPUs
which libstdc++ supports.  We could add [[gnu::attribute ("no-sse2")]]
there perhaps conditionally, but it all gets quite ugly.

The following patch instead adds a target hook which allows the backend
to temporarily tweak registered types such that emit_support_tinfos
emits whatever is needed.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2023-02-23  Jakub Jelinek  <jakub@redhat.com>

	PR target/108883
	* hooks.h (hook_void_bool): Declare.
	* hooks.cc (hook_void_bool): New function.
	* target.def (emit_support_tinfos): New target hook.
	* doc/tm.texi.in (emit_support_tinfos): Document it.
	* doc/tm.texi: Regenerated.
	* config/i386/i386.cc (ix86_emit_support_tinfos): New function.
	(TARGET_EMIT_SUPPORT_TINFOS): Redefine.

	* rtti.cc (emit_support_tinfos): Call targetm.emit_support_tinfos
	before and after emit_support_tinfo_1 calls.

--- gcc/hooks.h.jj	2023-01-02 09:32:29.418183667 +0100
+++ gcc/hooks.h	2023-02-22 12:34:32.144973558 +0100
@@ -77,6 +77,7 @@ extern bool hook_bool_wint_wint_uint_boo
 						unsigned int, bool);
 
 extern void hook_void_void (void);
+extern void hook_void_bool (bool);
 extern void hook_void_constcharptr (const char *);
 extern void hook_void_rtx_insn_int (rtx_insn *, int);
 extern void hook_void_FILEptr_constcharptr (FILE *, const char *);
--- gcc/hooks.cc.jj	2023-01-02 09:32:49.675890970 +0100
+++ gcc/hooks.cc	2023-02-22 12:36:46.241035355 +0100
@@ -271,6 +271,11 @@ hook_hwi_void_0 (void)
 }
 
 void
+hook_void_bool (bool)
+{
+}
+
+void
 hook_void_tree (tree)
 {
 }
--- gcc/target.def.jj	2023-01-04 10:45:50.117881714 +0100
+++ gcc/target.def	2023-02-22 12:33:39.715731356 +0100
@@ -2606,6 +2606,20 @@ types.",
  const char *, (const_tree type),
  hook_constcharptr_const_tree_null)
 
+/* Temporarily add conditional target specific types for the purpose of
+   emitting C++ fundamental type tinfos.  */
+DEFHOOK
+(emit_support_tinfos,
+ "If your target defines any fundamental types which depend on ISA flags,\n\
+they might need C++ tinfo symbols in libsupc++/libstdc++ regardless of\n\
+ISA flags the library is compiled with.\n\
+The hook is called with @var{add} @code{true} at the start of C++ FE\n\
+@code{emit_support_tinfos} and with @var{add} @code{false} at the end of it\n\
+and can temporarily create fundamental types that are not supposed to be\n\
+otherwise created due to the ISA options.",
+ void, (bool add),
+ hook_void_bool)
+
 /* Make any adjustments to libfunc names needed for this target.  */
 DEFHOOK
 (init_libfuncs,
--- gcc/doc/tm.texi.in.jj	2023-01-16 11:52:16.124733460 +0100
+++ gcc/doc/tm.texi.in	2023-02-22 12:46:37.951482849 +0100
@@ -1286,6 +1286,8 @@ pattern needs to support both a 32- and
 
 @hook TARGET_MANGLE_TYPE
 
+@hook TARGET_EMIT_SUPPORT_TINFOS
+
 @node Type Layout
 @section Layout of Source Language Data Types
 
--- gcc/doc/tm.texi.jj	2023-01-16 11:52:16.123733475 +0100
+++ gcc/doc/tm.texi	2023-02-22 12:46:41.741428081 +0100
@@ -1525,6 +1525,16 @@ appropriate for a target that does not d
 types.
 @end deftypefn
 
+@deftypefn {Target Hook} void TARGET_EMIT_SUPPORT_TINFOS (bool @var{add})
+If your target defines any fundamental types which depend on ISA flags,
+they might need C++ tinfo symbols in libsupc++/libstdc++ regardless of
+ISA flags the library is compiled with.
+The hook is called with @var{add} @code{true} at the start of C++ FE
+@code{emit_support_tinfos} and with @var{add} @code{false} at the end of it
+and can temporarily create fundamental types that are not supposed to be
+otherwise created due to the ISA options.
+@end deftypefn
+
 @node Type Layout
 @section Layout of Source Language Data Types
 
--- gcc/config/i386/i386.cc.jj	2023-02-16 10:13:23.701210667 +0100
+++ gcc/config/i386/i386.cc	2023-02-22 12:59:55.110960505 +0100
@@ -22775,6 +22775,30 @@ ix86_mangle_type (const_tree type)
     }
 }
 
+/* Temporarily tweak the set of fundamental types for C++
+   emit_support_tinfos purposes.  */
+
+static void
+ix86_emit_support_tinfos (bool add)
+{
+  extern tree ix86_float16_type_node;
+  extern tree ix86_bf16_type_node;
+
+  if (TARGET_SSE2)
+    return;
+  if (add)
+    {
+      gcc_checking_assert (!float16_type_node && !bfloat16_type_node);
+      float16_type_node = ix86_float16_type_node;
+      bfloat16_type_node = ix86_bf16_type_node;
+    }
+  else
+    {
+      float16_type_node = NULL_TREE;
+      bfloat16_type_node = NULL_TREE;
+    }
+}
+
 static GTY(()) tree ix86_tls_stack_chk_guard_decl;
 
 static tree
@@ -24954,6 +24978,9 @@ ix86_libgcc_floating_mode_supported_p
 #undef TARGET_MANGLE_TYPE
 #define TARGET_MANGLE_TYPE ix86_mangle_type
 
+#undef TARGET_EMIT_SUPPORT_TINFOS
+#define TARGET_EMIT_SUPPORT_TINFOS ix86_emit_support_tinfos
+
 #undef TARGET_STACK_PROTECT_GUARD
 #define TARGET_STACK_PROTECT_GUARD ix86_stack_protect_guard
 
--- gcc/cp/rtti.cc.jj	2023-01-16 11:52:16.090733961 +0100
+++ gcc/cp/rtti.cc	2023-02-22 12:40:10.078089124 +0100
@@ -1623,6 +1623,9 @@ emit_support_tinfos (void)
   if (!dtor || DECL_EXTERNAL (dtor))
     return;
 
+  /* Tell target code that support tinfos are about to be emitted.  */
+  targetm.emit_support_tinfos (true);
+
   /* All these are really builtins.  So set the location.  */
   location_t saved_loc = input_location;
   input_location = BUILTINS_LOCATION;
@@ -1652,6 +1655,9 @@ emit_support_tinfos (void)
       emit_support_tinfo_1 (fallback_dfloat128_type);
     }
   input_location = saved_loc;
+
+  /* Tell target code that support tinfos have been emitted.  */
+  targetm.emit_support_tinfos (false);
 }
 
 /* Finish a type info decl. DECL_PTR is a pointer to an unemitted

	Jakub


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] c++: Add target hook for emit_support_tinfos [PR108883]
  2023-02-23 10:23 [PATCH] c++: Add target hook for emit_support_tinfos [PR108883] Jakub Jelinek
@ 2023-02-27 23:26 ` Jason Merrill
  2023-02-27 23:51   ` Jakub Jelinek
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Merrill @ 2023-02-27 23:26 UTC (permalink / raw)
  To: Jakub Jelinek, Jonathan Wakely; +Cc: gcc-patches

On 2/23/23 05:23, Jakub Jelinek wrote:
> Hi!
> 
> _Float16 and decltype(0.0bf16) types are on x86 supported only with
> -msse2.  On x86_64 that is the default, but on ia32 it is not.
> We should still emit fundamental type tinfo for those types in
> libsupc++.a/libstdc++.*, regardless of whether libsupc++/libstdc++
> is compiled with -msse2 or not, as user programs can be compiled
> with different ISA flags from libsupc++/libstdc++ and if they
> are compiled with -msse2 and use std::float16_t or std::bfloat16_t
> and need RTTI for it, it should work out of the box.  Furthermore,
> libstdc++ ABI on ia32 shouldn't depend on whether the library
> is compiled with -mno-sse or -msse2.
> 
> Unfortunately, just hacking up libsupc++ Makefile/configure so that
> a single source is compiled with -msse2 isn't appropriate, because
> that TU emits also code and the code should be able to run on CPUs
> which libstdc++ supports.  We could add [[gnu::attribute ("no-sse2")]]
> there perhaps conditionally, but it all gets quite ugly.
> 
> The following patch instead adds a target hook which allows the backend
> to temporarily tweak registered types such that emit_support_tinfos
> emits whatever is needed.

Why handle these types differently from the DFP handling at the end of 
emit_support_tinfos?

> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2023-02-23  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR target/108883
> 	* hooks.h (hook_void_bool): Declare.
> 	* hooks.cc (hook_void_bool): New function.
> 	* target.def (emit_support_tinfos): New target hook.
> 	* doc/tm.texi.in (emit_support_tinfos): Document it.
> 	* doc/tm.texi: Regenerated.
> 	* config/i386/i386.cc (ix86_emit_support_tinfos): New function.
> 	(TARGET_EMIT_SUPPORT_TINFOS): Redefine.
> 
> 	* rtti.cc (emit_support_tinfos): Call targetm.emit_support_tinfos
> 	before and after emit_support_tinfo_1 calls.
> 
> --- gcc/hooks.h.jj	2023-01-02 09:32:29.418183667 +0100
> +++ gcc/hooks.h	2023-02-22 12:34:32.144973558 +0100
> @@ -77,6 +77,7 @@ extern bool hook_bool_wint_wint_uint_boo
>   						unsigned int, bool);
>   
>   extern void hook_void_void (void);
> +extern void hook_void_bool (bool);
>   extern void hook_void_constcharptr (const char *);
>   extern void hook_void_rtx_insn_int (rtx_insn *, int);
>   extern void hook_void_FILEptr_constcharptr (FILE *, const char *);
> --- gcc/hooks.cc.jj	2023-01-02 09:32:49.675890970 +0100
> +++ gcc/hooks.cc	2023-02-22 12:36:46.241035355 +0100
> @@ -271,6 +271,11 @@ hook_hwi_void_0 (void)
>   }
>   
>   void
> +hook_void_bool (bool)
> +{
> +}
> +
> +void
>   hook_void_tree (tree)
>   {
>   }
> --- gcc/target.def.jj	2023-01-04 10:45:50.117881714 +0100
> +++ gcc/target.def	2023-02-22 12:33:39.715731356 +0100
> @@ -2606,6 +2606,20 @@ types.",
>    const char *, (const_tree type),
>    hook_constcharptr_const_tree_null)
>   
> +/* Temporarily add conditional target specific types for the purpose of
> +   emitting C++ fundamental type tinfos.  */
> +DEFHOOK
> +(emit_support_tinfos,
> + "If your target defines any fundamental types which depend on ISA flags,\n\
> +they might need C++ tinfo symbols in libsupc++/libstdc++ regardless of\n\
> +ISA flags the library is compiled with.\n\
> +The hook is called with @var{add} @code{true} at the start of C++ FE\n\
> +@code{emit_support_tinfos} and with @var{add} @code{false} at the end of it\n\
> +and can temporarily create fundamental types that are not supposed to be\n\
> +otherwise created due to the ISA options.",
> + void, (bool add),
> + hook_void_bool)
> +
>   /* Make any adjustments to libfunc names needed for this target.  */
>   DEFHOOK
>   (init_libfuncs,
> --- gcc/doc/tm.texi.in.jj	2023-01-16 11:52:16.124733460 +0100
> +++ gcc/doc/tm.texi.in	2023-02-22 12:46:37.951482849 +0100
> @@ -1286,6 +1286,8 @@ pattern needs to support both a 32- and
>   
>   @hook TARGET_MANGLE_TYPE
>   
> +@hook TARGET_EMIT_SUPPORT_TINFOS
> +
>   @node Type Layout
>   @section Layout of Source Language Data Types
>   
> --- gcc/doc/tm.texi.jj	2023-01-16 11:52:16.123733475 +0100
> +++ gcc/doc/tm.texi	2023-02-22 12:46:41.741428081 +0100
> @@ -1525,6 +1525,16 @@ appropriate for a target that does not d
>   types.
>   @end deftypefn
>   
> +@deftypefn {Target Hook} void TARGET_EMIT_SUPPORT_TINFOS (bool @var{add})
> +If your target defines any fundamental types which depend on ISA flags,
> +they might need C++ tinfo symbols in libsupc++/libstdc++ regardless of
> +ISA flags the library is compiled with.
> +The hook is called with @var{add} @code{true} at the start of C++ FE
> +@code{emit_support_tinfos} and with @var{add} @code{false} at the end of it
> +and can temporarily create fundamental types that are not supposed to be
> +otherwise created due to the ISA options.
> +@end deftypefn
> +
>   @node Type Layout
>   @section Layout of Source Language Data Types
>   
> --- gcc/config/i386/i386.cc.jj	2023-02-16 10:13:23.701210667 +0100
> +++ gcc/config/i386/i386.cc	2023-02-22 12:59:55.110960505 +0100
> @@ -22775,6 +22775,30 @@ ix86_mangle_type (const_tree type)
>       }
>   }
>   
> +/* Temporarily tweak the set of fundamental types for C++
> +   emit_support_tinfos purposes.  */
> +
> +static void
> +ix86_emit_support_tinfos (bool add)
> +{
> +  extern tree ix86_float16_type_node;
> +  extern tree ix86_bf16_type_node;
> +
> +  if (TARGET_SSE2)
> +    return;
> +  if (add)
> +    {
> +      gcc_checking_assert (!float16_type_node && !bfloat16_type_node);
> +      float16_type_node = ix86_float16_type_node;
> +      bfloat16_type_node = ix86_bf16_type_node;
> +    }
> +  else
> +    {
> +      float16_type_node = NULL_TREE;
> +      bfloat16_type_node = NULL_TREE;
> +    }
> +}
> +
>   static GTY(()) tree ix86_tls_stack_chk_guard_decl;
>   
>   static tree
> @@ -24954,6 +24978,9 @@ ix86_libgcc_floating_mode_supported_p
>   #undef TARGET_MANGLE_TYPE
>   #define TARGET_MANGLE_TYPE ix86_mangle_type
>   
> +#undef TARGET_EMIT_SUPPORT_TINFOS
> +#define TARGET_EMIT_SUPPORT_TINFOS ix86_emit_support_tinfos
> +
>   #undef TARGET_STACK_PROTECT_GUARD
>   #define TARGET_STACK_PROTECT_GUARD ix86_stack_protect_guard
>   
> --- gcc/cp/rtti.cc.jj	2023-01-16 11:52:16.090733961 +0100
> +++ gcc/cp/rtti.cc	2023-02-22 12:40:10.078089124 +0100
> @@ -1623,6 +1623,9 @@ emit_support_tinfos (void)
>     if (!dtor || DECL_EXTERNAL (dtor))
>       return;
>   
> +  /* Tell target code that support tinfos are about to be emitted.  */
> +  targetm.emit_support_tinfos (true);
> +
>     /* All these are really builtins.  So set the location.  */
>     location_t saved_loc = input_location;
>     input_location = BUILTINS_LOCATION;
> @@ -1652,6 +1655,9 @@ emit_support_tinfos (void)
>         emit_support_tinfo_1 (fallback_dfloat128_type);
>       }
>     input_location = saved_loc;
> +
> +  /* Tell target code that support tinfos have been emitted.  */
> +  targetm.emit_support_tinfos (false);
>   }
>   
>   /* Finish a type info decl. DECL_PTR is a pointer to an unemitted
> 
> 	Jakub
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] c++: Add target hook for emit_support_tinfos [PR108883]
  2023-02-27 23:26 ` Jason Merrill
@ 2023-02-27 23:51   ` Jakub Jelinek
  2023-02-28 10:04     ` [PATCH] c++: Emit fundamental tinfos for all _Float*/decltype(0.0bf16) types unconditionally [PR108883] Jakub Jelinek
  2023-03-01 22:50     ` [PATCH] c++: Add target hook for emit_support_tinfos [PR108883] Jason Merrill
  0 siblings, 2 replies; 8+ messages in thread
From: Jakub Jelinek @ 2023-02-27 23:51 UTC (permalink / raw)
  To: Jason Merrill; +Cc: Jonathan Wakely, gcc-patches

On Mon, Feb 27, 2023 at 06:26:04PM -0500, Jason Merrill wrote:
> > The following patch instead adds a target hook which allows the backend
> > to temporarily tweak registered types such that emit_support_tinfos
> > emits whatever is needed.
> 
> Why handle these types differently from the DFP handling at the end of
> emit_support_tinfos?

One thing is that the fallback_* nodes look like a waste to me,
the tinfo decls are mangled right away, and the fallback_* nodes need to be
walked by GC, so I think we could get away even for the decimal tinfos
to just do:
      dfloat32_type_node = make_node (REAL_TYPE);
      emit_support_tinfo_1 (dfloat32_type_node);
      dfloat32_type_node = NULL_TREE;
etc. and drop the fallback stuff.
If we wanted to do fallback_* even for the _Float*/decltype(0.0bf16)
nodes, which are at least sometimes mangled in target hooks it would
make stuff harder because fallback_* is C++ FE private.

And then there is a question whether we want to emit rtti for
_Float{16,32,64,128}, _Float{32,64,128}x and decltype(0.0bf16) regardless
of whether the target supports them at all or not.
Emitting them always would have an advantage, if say bfloat16_t support
isn't added for aarch64 for GCC 13 (it is still pending review), we wouldn't
need to deal with symbol versioning for it in GCC 14 or later.
On the other side, on some arches some types are very unlikely to be
supported.  And e.g. _Float128x isn't supported on any arch right now.

Though, if we can get rid of the fallback_* stuff and we wanted to emit
all _Float{16,32,64,128}, _Float{32,64,128}x and decltype(0.0bf16) tinfos
on all arches (or say for now all but _Float128x), we could do it simply
by splitting the fundamentals array in emit_support_tinfos into
one without fallback and one with fallback, put say
    &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
    &bfloat16_type_node, &float16_type_node, &float32_type_node,
    &float64_type_node, &float128_type_node, &float32x_type_node,
    &float64x_type_node, &float128x_type_node, 0
into the latter and simply handle the NULL case with a temporary fallback,
like:
  tree fallback = NULL_TREE;
  for (ix = 0; fundamentals_with_fallback[ix]; ix++)
    if (*fundamentals_with_fallback[ix])
      emit_support_tinfo_1 (*fundamentals_with_fallback[ix]);
    else
      {
	if (fallback == NULL_TREE)
	  fallback = make_node (REAL_TYPE);
	*fundamentals_with_fallback[ix] = fallback;
	emit_support_tinfo_1 (fallback);
	*fundamentals_with_fallback[ix] = NULL_TREE;
      }

	Jakub


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] c++: Emit fundamental tinfos for all _Float*/decltype(0.0bf16) types unconditionally [PR108883]
  2023-02-27 23:51   ` Jakub Jelinek
@ 2023-02-28 10:04     ` Jakub Jelinek
  2023-03-01  9:19       ` [PATCH] c++, v2: " Jakub Jelinek
  2023-03-01 22:50     ` [PATCH] c++: Add target hook for emit_support_tinfos [PR108883] Jason Merrill
  1 sibling, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2023-02-28 10:04 UTC (permalink / raw)
  To: Jason Merrill, Jonathan Wakely, gcc-patches

Hi!

On Tue, Feb 28, 2023 at 12:51:06AM +0100, Jakub Jelinek via Gcc-patches wrote:
> And then there is a question whether we want to emit rtti for
> _Float{16,32,64,128}, _Float{32,64,128}x and decltype(0.0bf16) regardless
> of whether the target supports them at all or not.

If the answer to that is yes, we want them all, then the following patch
arranges that (had to force immediate emit_tinfo_decl to get rid of the
fallback_* stuff), these days it doesn't mean it will be emitted right away
anyway, just it will be registered with varpool and have initializers
created.

If the answer is yes, except _Float128x, we could in the patch just move
that &float128x_type_node to the other initializer.

If the answer is no, then I think we need a target hook which would tell us
which fundamentals should be forced this way, could have e.g. a form
of returning a vector of global tree addresses to be treated that way in
addition to the standard ones (dfloat*), or a hook that would take
a callback pointer and be called with &emit_support_tinfo_1 and the backend
would call the callback on any types it wants to handle that way.

2023-02-28  Jakub Jelinek  <jakub@redhat.com>

	PR target/108883
	* cp-tree.h (enum cp_tree_index): Remove CPTI_FALLBACK_DFLOAT*_TYPE
	enumerators.
	(fallback_dfloat32_type, fallback_dfloat64_type,
	fallback_dfloat128_type): Remove.
	* rtti.cc (emit_support_tinfo_1): If not emitted already, call
	emit_tinfo_decl and remove from unemitted_tinfo_decls right away.
	(emit_support_tinfos): Move &dfloat*_type_node, &bfloat16-type_node
	and &float[0-9]*_type_node from fundamentals array into new
	fundamentals_with_fallback array.  Call emit_support_tinfo_1
	on elements of that array too, with the difference that if
	the type is NULL, use a fallback REAL_TYPE for it temporarily.
	Drop the !targetm.decimal_float_supported_p () handling.
	* mangle.cc (write_builtin_type): Remove references to
	fallback_dfloat*_type.

--- gcc/cp/cp-tree.h.jj	2023-02-18 12:38:30.910023526 +0100
+++ gcc/cp/cp-tree.h	2023-02-28 10:39:22.377379948 +0100
@@ -235,10 +235,6 @@ enum cp_tree_index
 
     CPTI_PSEUDO_CONTRACT_VIOLATION,
 
-    CPTI_FALLBACK_DFLOAT32_TYPE,
-    CPTI_FALLBACK_DFLOAT64_TYPE,
-    CPTI_FALLBACK_DFLOAT128_TYPE,
-
     CPTI_MAX
 };
 
@@ -397,13 +393,6 @@ extern GTY(()) tree cp_global_trees[CPTI
    access nodes in tree.h.  */
 
 #define access_default_node		null_node
-
-/* Variant of dfloat{32,64,128}_type_node only used for fundamental
-   rtti purposes if DFP is disabled.  */
-#define fallback_dfloat32_type		cp_global_trees[CPTI_FALLBACK_DFLOAT32_TYPE]
-#define fallback_dfloat64_type		cp_global_trees[CPTI_FALLBACK_DFLOAT64_TYPE]
-#define fallback_dfloat128_type		cp_global_trees[CPTI_FALLBACK_DFLOAT128_TYPE]
-
 \f
 #include "name-lookup.h"
 
--- gcc/cp/rtti.cc.jj	2023-02-22 15:58:50.137998090 +0100
+++ gcc/cp/rtti.cc	2023-02-28 10:31:53.693893021 +0100
@@ -1577,6 +1577,15 @@ emit_support_tinfo_1 (tree bltn)
 	  gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
 	  DECL_INTERFACE_KNOWN (tinfo) = 1;
 	}
+
+      /* Emit it right away if not emitted already.  */
+      if (DECL_INITIAL (tinfo) == NULL_TREE)
+	{
+	  gcc_assert (unemitted_tinfo_decls->last () == tinfo);
+	  bool ok = emit_tinfo_decl (tinfo);
+	  gcc_assert (ok);
+	  unemitted_tinfo_decls->pop ();
+	}
     }
 }
 
@@ -1602,10 +1611,17 @@ emit_support_tinfos (void)
     &long_integer_type_node, &long_unsigned_type_node,
     &long_long_integer_type_node, &long_long_unsigned_type_node,
     &float_type_node, &double_type_node, &long_double_type_node,
+    &nullptr_type_node,
+    0
+  };
+  /* Similar, but for floating point types only which should get type info
+     regardless whether they are non-NULL or NULL.  */
+  static tree *const fundamentals_with_fallback[] =
+  {
     &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
     &bfloat16_type_node, &float16_type_node, &float32_type_node,
     &float64_type_node, &float128_type_node, &float32x_type_node,
-    &float64x_type_node, &float128x_type_node, &nullptr_type_node,
+    &float64x_type_node, &float128x_type_node,
     0
   };
   int ix;
@@ -1627,8 +1643,20 @@ emit_support_tinfos (void)
   location_t saved_loc = input_location;
   input_location = BUILTINS_LOCATION;
   doing_runtime = 1;
+  tree fallback = NULL_TREE;
   for (ix = 0; fundamentals[ix]; ix++)
     emit_support_tinfo_1 (*fundamentals[ix]);
+  for (ix = 0; fundamentals_with_fallback[ix]; ix++)
+    if (*fundamentals_with_fallback[ix])
+      emit_support_tinfo_1 (*fundamentals_with_fallback[ix]);
+    else
+      {
+	if (fallback == NULL_TREE)
+	  fallback = make_node (REAL_TYPE);
+	*fundamentals_with_fallback[ix] = fallback;
+	emit_support_tinfo_1 (fallback);
+	*fundamentals_with_fallback[ix] = NULL_TREE;
+      }
   for (ix = 0; ix < NUM_INT_N_ENTS; ix ++)
     if (int_n_enabled_p[ix])
       {
@@ -1637,20 +1665,6 @@ emit_support_tinfos (void)
       }
   for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
     emit_support_tinfo_1 (TREE_VALUE (t));
-  /* For compatibility, emit DFP typeinfos even when DFP isn't enabled,
-     because we've emitted that in the past.  */
-  if (!targetm.decimal_float_supported_p ())
-    {
-      gcc_assert (dfloat32_type_node == NULL_TREE
-		  && dfloat64_type_node == NULL_TREE
-		  && dfloat128_type_node == NULL_TREE);
-      fallback_dfloat32_type = make_node (REAL_TYPE);
-      fallback_dfloat64_type = make_node (REAL_TYPE);
-      fallback_dfloat128_type = make_node (REAL_TYPE);
-      emit_support_tinfo_1 (fallback_dfloat32_type);
-      emit_support_tinfo_1 (fallback_dfloat64_type);
-      emit_support_tinfo_1 (fallback_dfloat128_type);
-    }
   input_location = saved_loc;
 }
 
--- gcc/cp/mangle.cc.jj	2023-02-09 09:31:48.900375193 +0100
+++ gcc/cp/mangle.cc	2023-02-28 09:39:24.683561290 +0100
@@ -2732,11 +2732,11 @@ write_builtin_type (tree type)
 	write_char ('d');
       else if (type == long_double_type_node)
 	write_char ('e');
-      else if (type == dfloat32_type_node || type == fallback_dfloat32_type)
+      else if (type == dfloat32_type_node)
 	write_string ("Df");
-      else if (type == dfloat64_type_node || type == fallback_dfloat64_type)
+      else if (type == dfloat64_type_node)
 	write_string ("Dd");
-      else if (type == dfloat128_type_node || type == fallback_dfloat128_type)
+      else if (type == dfloat128_type_node)
 	write_string ("De");
       else if (type == float16_type_node)
 	write_string ("DF16_");


	Jakub


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] c++, v2: Emit fundamental tinfos for all _Float*/decltype(0.0bf16) types unconditionally [PR108883]
  2023-02-28 10:04     ` [PATCH] c++: Emit fundamental tinfos for all _Float*/decltype(0.0bf16) types unconditionally [PR108883] Jakub Jelinek
@ 2023-03-01  9:19       ` Jakub Jelinek
  0 siblings, 0 replies; 8+ messages in thread
From: Jakub Jelinek @ 2023-03-01  9:19 UTC (permalink / raw)
  To: Jason Merrill, Jonathan Wakely, gcc-patches

On Tue, Feb 28, 2023 at 11:04:42AM +0100, Jakub Jelinek via Gcc-patches wrote:
> On Tue, Feb 28, 2023 at 12:51:06AM +0100, Jakub Jelinek via Gcc-patches wrote:
> > And then there is a question whether we want to emit rtti for
> > _Float{16,32,64,128}, _Float{32,64,128}x and decltype(0.0bf16) regardless
> > of whether the target supports them at all or not.
> 
> If the answer to that is yes, we want them all, then the following patch
> arranges that (had to force immediate emit_tinfo_decl to get rid of the
> fallback_* stuff), these days it doesn't mean it will be emitted right away
> anyway, just it will be registered with varpool and have initializers
> created.
> 
> If the answer is yes, except _Float128x, we could in the patch just move
> that &float128x_type_node to the other initializer.
> 
> If the answer is no, then I think we need a target hook which would tell us
> which fundamentals should be forced this way, could have e.g. a form
> of returning a vector of global tree addresses to be treated that way in
> addition to the standard ones (dfloat*), or a hook that would take
> a callback pointer and be called with &emit_support_tinfo_1 and the backend
> would call the callback on any types it wants to handle that way.

Here is an actually bootstrapped/regtested version of that patch - had to add
bfloat16_type_node mangling to cp/mangle.cc, otherwise it ICEd e.g. on
i686-linux when not compiled with -msse2, but also on any non-x86 target.

Though, if the answer to the earlier question is no, I think the version with
a callback passed to target hook would be better because e.g. target might
need to specify some particular TYPE_MODE or similar things on the fallback
type for a particular case.

2023-03-01  Jakub Jelinek  <jakub@redhat.com>

	PR target/108883
	* cp-tree.h (enum cp_tree_index): Remove CPTI_FALLBACK_DFLOAT*_TYPE
	enumerators.
	(fallback_dfloat32_type, fallback_dfloat64_type,
	fallback_dfloat128_type): Remove.
	* rtti.cc (emit_support_tinfo_1): If not emitted already, call
	emit_tinfo_decl and remove from unemitted_tinfo_decls right away.
	(emit_support_tinfos): Move &dfloat*_type_node, &bfloat16-type_node
	and &float[0-9]*_type_node from fundamentals array into new
	fundamentals_with_fallback array.  Call emit_support_tinfo_1
	on elements of that array too, with the difference that if
	the type is NULL, use a fallback REAL_TYPE for it temporarily.
	Drop the !targetm.decimal_float_supported_p () handling.
	* mangle.cc (write_builtin_type): Remove references to
	fallback_dfloat*_type.  Handle bfloat16_type_node mangling.

--- gcc/cp/cp-tree.h.jj	2023-02-18 12:38:30.910023526 +0100
+++ gcc/cp/cp-tree.h	2023-02-28 10:39:22.377379948 +0100
@@ -235,10 +235,6 @@ enum cp_tree_index
 
     CPTI_PSEUDO_CONTRACT_VIOLATION,
 
-    CPTI_FALLBACK_DFLOAT32_TYPE,
-    CPTI_FALLBACK_DFLOAT64_TYPE,
-    CPTI_FALLBACK_DFLOAT128_TYPE,
-
     CPTI_MAX
 };
 
@@ -397,13 +393,6 @@ extern GTY(()) tree cp_global_trees[CPTI
    access nodes in tree.h.  */
 
 #define access_default_node		null_node
-
-/* Variant of dfloat{32,64,128}_type_node only used for fundamental
-   rtti purposes if DFP is disabled.  */
-#define fallback_dfloat32_type		cp_global_trees[CPTI_FALLBACK_DFLOAT32_TYPE]
-#define fallback_dfloat64_type		cp_global_trees[CPTI_FALLBACK_DFLOAT64_TYPE]
-#define fallback_dfloat128_type		cp_global_trees[CPTI_FALLBACK_DFLOAT128_TYPE]
-
 \f
 #include "name-lookup.h"
 
--- gcc/cp/rtti.cc.jj	2023-02-22 15:58:50.137998090 +0100
+++ gcc/cp/rtti.cc	2023-02-28 10:31:53.693893021 +0100
@@ -1577,6 +1577,15 @@ emit_support_tinfo_1 (tree bltn)
 	  gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
 	  DECL_INTERFACE_KNOWN (tinfo) = 1;
 	}
+
+      /* Emit it right away if not emitted already.  */
+      if (DECL_INITIAL (tinfo) == NULL_TREE)
+	{
+	  gcc_assert (unemitted_tinfo_decls->last () == tinfo);
+	  bool ok = emit_tinfo_decl (tinfo);
+	  gcc_assert (ok);
+	  unemitted_tinfo_decls->pop ();
+	}
     }
 }
 
@@ -1602,10 +1611,17 @@ emit_support_tinfos (void)
     &long_integer_type_node, &long_unsigned_type_node,
     &long_long_integer_type_node, &long_long_unsigned_type_node,
     &float_type_node, &double_type_node, &long_double_type_node,
+    &nullptr_type_node,
+    0
+  };
+  /* Similar, but for floating point types only which should get type info
+     regardless whether they are non-NULL or NULL.  */
+  static tree *const fundamentals_with_fallback[] =
+  {
     &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
     &bfloat16_type_node, &float16_type_node, &float32_type_node,
     &float64_type_node, &float128_type_node, &float32x_type_node,
-    &float64x_type_node, &float128x_type_node, &nullptr_type_node,
+    &float64x_type_node, &float128x_type_node,
     0
   };
   int ix;
@@ -1627,8 +1643,20 @@ emit_support_tinfos (void)
   location_t saved_loc = input_location;
   input_location = BUILTINS_LOCATION;
   doing_runtime = 1;
+  tree fallback = NULL_TREE;
   for (ix = 0; fundamentals[ix]; ix++)
     emit_support_tinfo_1 (*fundamentals[ix]);
+  for (ix = 0; fundamentals_with_fallback[ix]; ix++)
+    if (*fundamentals_with_fallback[ix])
+      emit_support_tinfo_1 (*fundamentals_with_fallback[ix]);
+    else
+      {
+	if (fallback == NULL_TREE)
+	  fallback = make_node (REAL_TYPE);
+	*fundamentals_with_fallback[ix] = fallback;
+	emit_support_tinfo_1 (fallback);
+	*fundamentals_with_fallback[ix] = NULL_TREE;
+      }
   for (ix = 0; ix < NUM_INT_N_ENTS; ix ++)
     if (int_n_enabled_p[ix])
       {
@@ -1637,20 +1665,6 @@ emit_support_tinfos (void)
       }
   for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
     emit_support_tinfo_1 (TREE_VALUE (t));
-  /* For compatibility, emit DFP typeinfos even when DFP isn't enabled,
-     because we've emitted that in the past.  */
-  if (!targetm.decimal_float_supported_p ())
-    {
-      gcc_assert (dfloat32_type_node == NULL_TREE
-		  && dfloat64_type_node == NULL_TREE
-		  && dfloat128_type_node == NULL_TREE);
-      fallback_dfloat32_type = make_node (REAL_TYPE);
-      fallback_dfloat64_type = make_node (REAL_TYPE);
-      fallback_dfloat128_type = make_node (REAL_TYPE);
-      emit_support_tinfo_1 (fallback_dfloat32_type);
-      emit_support_tinfo_1 (fallback_dfloat64_type);
-      emit_support_tinfo_1 (fallback_dfloat128_type);
-    }
   input_location = saved_loc;
 }
 
--- gcc/cp/mangle.cc.jj	2023-02-09 09:31:48.900375193 +0100
+++ gcc/cp/mangle.cc	2023-02-28 23:55:06.912039890 +0100
@@ -2732,11 +2732,11 @@ write_builtin_type (tree type)
 	write_char ('d');
       else if (type == long_double_type_node)
 	write_char ('e');
-      else if (type == dfloat32_type_node || type == fallback_dfloat32_type)
+      else if (type == dfloat32_type_node)
 	write_string ("Df");
-      else if (type == dfloat64_type_node || type == fallback_dfloat64_type)
+      else if (type == dfloat64_type_node)
 	write_string ("Dd");
-      else if (type == dfloat128_type_node || type == fallback_dfloat128_type)
+      else if (type == dfloat128_type_node)
 	write_string ("De");
       else if (type == float16_type_node)
 	write_string ("DF16_");
@@ -2752,6 +2752,8 @@ write_builtin_type (tree type)
 	write_string ("DF64x");
       else if (type == float128x_type_node)
 	write_string ("DF128x");
+      else if (type == bfloat16_type_node)
+	write_string ("DF16b");
       else
 	gcc_unreachable ();
       break;


	Jakub


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] c++: Add target hook for emit_support_tinfos [PR108883]
  2023-02-27 23:51   ` Jakub Jelinek
  2023-02-28 10:04     ` [PATCH] c++: Emit fundamental tinfos for all _Float*/decltype(0.0bf16) types unconditionally [PR108883] Jakub Jelinek
@ 2023-03-01 22:50     ` Jason Merrill
  2023-03-02 11:20       ` [PATCH] c++, v3: Emit fundamental tinfos for _Float16/decltype(0.0bf16) types on ia32 with -mno-sse2 [PR108883] Jakub Jelinek
  1 sibling, 1 reply; 8+ messages in thread
From: Jason Merrill @ 2023-03-01 22:50 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jonathan Wakely, gcc-patches

On 2/27/23 18:51, Jakub Jelinek wrote:
> On Mon, Feb 27, 2023 at 06:26:04PM -0500, Jason Merrill wrote:
>>> The following patch instead adds a target hook which allows the backend
>>> to temporarily tweak registered types such that emit_support_tinfos
>>> emits whatever is needed.
>>
>> Why handle these types differently from the DFP handling at the end of
>> emit_support_tinfos?
> 
> One thing is that the fallback_* nodes look like a waste to me,
> the tinfo decls are mangled right away, and the fallback_* nodes need to be
> walked by GC, so I think we could get away even for the decimal tinfos
> to just do:
>        dfloat32_type_node = make_node (REAL_TYPE);
>        emit_support_tinfo_1 (dfloat32_type_node);
>        dfloat32_type_node = NULL_TREE;
> etc. and drop the fallback stuff.

I think you're right.

> If we wanted to do fallback_* even for the _Float*/decltype(0.0bf16)
> nodes, which are at least sometimes mangled in target hooks it would
> make stuff harder because fallback_* is C++ FE private.
> 
> And then there is a question whether we want to emit rtti for
> _Float{16,32,64,128}, _Float{32,64,128}x and decltype(0.0bf16) regardless
> of whether the target supports them at all or not.
> Emitting them always would have an advantage, if say bfloat16_t support
> isn't added for aarch64 for GCC 13 (it is still pending review), we wouldn't
> need to deal with symbol versioning for it in GCC 14 or later.
> On the other side, on some arches some types are very unlikely to be
> supported.  And e.g. _Float128x isn't supported on any arch right now.

A good point.  Incidentally, it seems problematic for embedded users 
that all the fundamental type_infos are emitted in the same .o, making 
it hard to link in only the ones you care about.  And new floating-point 
variants add to that problem.  So perhaps until that is addressed, it's 
better to avoid adding a bunch more on targets that don't support them.

Hmm.

> Though, if we can get rid of the fallback_* stuff and we wanted to emit
> all _Float{16,32,64,128}, _Float{32,64,128}x and decltype(0.0bf16) tinfos
> on all arches (or say for now all but _Float128x), we could do it simply
> by splitting the fundamentals array in emit_support_tinfos into
> one without fallback and one with fallback, put say
>      &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
>      &bfloat16_type_node, &float16_type_node, &float32_type_node,
>      &float64_type_node, &float128_type_node, &float32x_type_node,
>      &float64x_type_node, &float128x_type_node, 0
> into the latter and simply handle the NULL case with a temporary fallback,
> like:
>    tree fallback = NULL_TREE;
>    for (ix = 0; fundamentals_with_fallback[ix]; ix++)
>      if (*fundamentals_with_fallback[ix])
>        emit_support_tinfo_1 (*fundamentals_with_fallback[ix]);
>      else
>        {
> 	if (fallback == NULL_TREE)
> 	  fallback = make_node (REAL_TYPE);
> 	*fundamentals_with_fallback[ix] = fallback;
> 	emit_support_tinfo_1 (fallback);
> 	*fundamentals_with_fallback[ix] = NULL_TREE;
>        }
> 
> 	Jakub
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] c++, v3: Emit fundamental tinfos for _Float16/decltype(0.0bf16) types on ia32 with -mno-sse2 [PR108883]
  2023-03-01 22:50     ` [PATCH] c++: Add target hook for emit_support_tinfos [PR108883] Jason Merrill
@ 2023-03-02 11:20       ` Jakub Jelinek
  2023-03-02 16:32         ` Jason Merrill
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2023-03-02 11:20 UTC (permalink / raw)
  To: Jason Merrill; +Cc: Jonathan Wakely, gcc-patches

Hi!

On Wed, Mar 01, 2023 at 05:50:47PM -0500, Jason Merrill wrote:
> > And then there is a question whether we want to emit rtti for
> > _Float{16,32,64,128}, _Float{32,64,128}x and decltype(0.0bf16) regardless
> > of whether the target supports them at all or not.
> > Emitting them always would have an advantage, if say bfloat16_t support
> > isn't added for aarch64 for GCC 13 (it is still pending review), we wouldn't
> > need to deal with symbol versioning for it in GCC 14 or later.
> > On the other side, on some arches some types are very unlikely to be
> > supported.  And e.g. _Float128x isn't supported on any arch right now.
> 
> A good point.  Incidentally, it seems problematic for embedded users that
> all the fundamental type_infos are emitted in the same .o, making it hard to
> link in only the ones you care about.  And new floating-point variants add
> to that problem.  So perhaps until that is addressed, it's better to avoid
> adding a bunch more on targets that don't support them.

Ok, so here is a variant of the patch which still drops the fallback_* stuff,
but for float*_type_node doesn't do the automatic fallback in generic code
and leaves those to a target hook.

So far lightly tested on x86_64-linux -m32/-m64:

2023-03-02  Jakub Jelinek  <jakub@redhat.com>

	PR target/108883
gcc/
	* target.h (emit_support_tinfos_callback): New typedef.
	* targhooks.h (default_emit_support_tinfos): Declare.
	* targhooks.cc (default_emit_support_tinfos): New function.
	* target.def (emit_support_tinfos): New target hook.
	* doc/tm.texi.in (emit_support_tinfos): Document it.
	* doc/tm.texi: Regenerated.
	* config/i386/i386.cc (ix86_emit_support_tinfos): New function.
	(TARGET_EMIT_SUPPORT_TINFOS): Redefine.
gcc/cp/
	* cp-tree.h (enum cp_tree_index): Remove CPTI_FALLBACK_DFLOAT*_TYPE
	enumerators.
	(fallback_dfloat32_type, fallback_dfloat64_type,
	fallback_dfloat128_type): Remove.
	* rtti.cc (emit_support_tinfo_1): If not emitted already, call
	emit_tinfo_decl and remove from unemitted_tinfo_decls right away.
	(emit_support_tinfos): Move &dfloat*_type_node from fundamentals array
	into new fundamentals_with_fallback array.  Call emit_support_tinfo_1
	on elements of that array too, with the difference that if
	the type is NULL, use a fallback REAL_TYPE for it temporarily.
	Drop the !targetm.decimal_float_supported_p () handling.  Call
	targetm.emit_support_tinfos at the end.
	* mangle.cc (write_builtin_type): Remove references to
	fallback_dfloat*_type.  Handle bfloat16_type_node mangling.

--- gcc/target.h.jj	2023-02-17 12:45:08.056638510 +0100
+++ gcc/target.h	2023-03-02 12:06:59.248146213 +0100
@@ -260,6 +260,8 @@ enum poly_value_estimate_kind
   POLY_VALUE_LIKELY
 };
 
+typedef void (*emit_support_tinfos_callback) (tree);
+
 extern bool verify_type_context (location_t, type_context_kind, const_tree,
 				 bool = false);
 
--- gcc/targhooks.h.jj	2023-01-02 09:32:50.422880177 +0100
+++ gcc/targhooks.h	2023-03-02 12:06:22.559686384 +0100
@@ -98,6 +98,8 @@ extern int default_builtin_vectorization
 
 extern tree default_builtin_reciprocal (tree);
 
+extern void default_emit_support_tinfos (emit_support_tinfos_callback);
+
 extern HOST_WIDE_INT default_static_rtx_alignment (machine_mode);
 extern HOST_WIDE_INT default_constant_alignment (const_tree, HOST_WIDE_INT);
 extern HOST_WIDE_INT constant_alignment_word_strings (const_tree,
--- gcc/targhooks.cc.jj	2023-01-02 09:32:52.591848839 +0100
+++ gcc/targhooks.cc	2023-03-02 12:01:39.576868114 +0100
@@ -752,6 +752,11 @@ default_builtin_reciprocal (tree)
   return NULL_TREE;
 }
 
+void
+default_emit_support_tinfos (emit_support_tinfos_callback)
+{
+}
+
 bool
 hook_bool_CUMULATIVE_ARGS_arg_info_false (cumulative_args_t,
 					  const function_arg_info &)
--- gcc/target.def.jj	2023-02-22 15:58:50.252996452 +0100
+++ gcc/target.def	2023-03-02 12:01:52.002684436 +0100
@@ -2606,6 +2606,19 @@ types.",
  const char *, (const_tree type),
  hook_constcharptr_const_tree_null)
 
+/* Temporarily add conditional target specific types for the purpose of
+   emitting C++ fundamental type tinfos.  */
+DEFHOOK
+(emit_support_tinfos,
+ "If your target defines any fundamental types which depend on ISA flags,\n\
+they might need C++ tinfo symbols in libsupc++/libstdc++ regardless of\n\
+ISA flags the library is compiled with.\n\
+This hook allows creating tinfo symbols even for those cases, by temporarily\n\
+creating corresponding fundamental type trees, calling the @var{callback}\n\
+function on it and setting the type back to @code{nullptr}.",
+ void, (emit_support_tinfos_callback callback),
+ default_emit_support_tinfos)
+
 /* Make any adjustments to libfunc names needed for this target.  */
 DEFHOOK
 (init_libfuncs,
--- gcc/doc/tm.texi.in.jj	2023-02-24 09:58:39.963508685 +0100
+++ gcc/doc/tm.texi.in	2023-03-02 11:47:50.044125831 +0100
@@ -1286,6 +1286,8 @@ pattern needs to support both a 32- and
 
 @hook TARGET_MANGLE_TYPE
 
+@hook TARGET_EMIT_SUPPORT_TINFOS
+
 @node Type Layout
 @section Layout of Source Language Data Types
 
--- gcc/doc/tm.texi.jj	2023-02-24 09:58:39.951508859 +0100
+++ gcc/doc/tm.texi	2023-03-02 12:02:18.312295512 +0100
@@ -1525,6 +1525,15 @@ appropriate for a target that does not d
 types.
 @end deftypefn
 
+@deftypefn {Target Hook} void TARGET_EMIT_SUPPORT_TINFOS (emit_support_tinfos_callback @var{callback})
+If your target defines any fundamental types which depend on ISA flags,
+they might need C++ tinfo symbols in libsupc++/libstdc++ regardless of
+ISA flags the library is compiled with.
+This hook allows creating tinfo symbols even for those cases, by temporarily
+creating corresponding fundamental type trees, calling the @var{callback}
+function on it and setting the type back to @code{nullptr}.
+@end deftypefn
+
 @node Type Layout
 @section Layout of Source Language Data Types
 
--- gcc/config/i386/i386.cc.jj	2023-02-22 15:58:50.109998489 +0100
+++ gcc/config/i386/i386.cc	2023-03-02 12:02:13.193371183 +0100
@@ -22775,6 +22775,27 @@ ix86_mangle_type (const_tree type)
     }
 }
 
+/* Create C++ tinfo symbols for only conditionally available fundamental
+   types.  */
+
+static void
+ix86_emit_support_tinfos (emit_support_tinfos_callback callback)
+{
+  extern tree ix86_float16_type_node;
+  extern tree ix86_bf16_type_node;
+
+  if (!TARGET_SSE2)
+    {
+      gcc_checking_assert (!float16_type_node && !bfloat16_type_node);
+      float16_type_node = ix86_float16_type_node;
+      bfloat16_type_node = ix86_bf16_type_node;
+      callback (float16_type_node);
+      callback (bfloat16_type_node);
+      float16_type_node = NULL_TREE;
+      bfloat16_type_node = NULL_TREE;
+    }
+}
+
 static GTY(()) tree ix86_tls_stack_chk_guard_decl;
 
 static tree
@@ -24954,6 +24975,9 @@ ix86_libgcc_floating_mode_supported_p
 #undef TARGET_MANGLE_TYPE
 #define TARGET_MANGLE_TYPE ix86_mangle_type
 
+#undef TARGET_EMIT_SUPPORT_TINFOS
+#define TARGET_EMIT_SUPPORT_TINFOS ix86_emit_support_tinfos
+
 #undef TARGET_STACK_PROTECT_GUARD
 #define TARGET_STACK_PROTECT_GUARD ix86_stack_protect_guard
 
--- gcc/cp/cp-tree.h.jj	2023-03-02 08:49:09.569844225 +0100
+++ gcc/cp/cp-tree.h	2023-03-02 11:45:41.972008622 +0100
@@ -235,10 +235,6 @@ enum cp_tree_index
 
     CPTI_PSEUDO_CONTRACT_VIOLATION,
 
-    CPTI_FALLBACK_DFLOAT32_TYPE,
-    CPTI_FALLBACK_DFLOAT64_TYPE,
-    CPTI_FALLBACK_DFLOAT128_TYPE,
-
     CPTI_MAX
 };
 
@@ -397,13 +393,6 @@ extern GTY(()) tree cp_global_trees[CPTI
    access nodes in tree.h.  */
 
 #define access_default_node		null_node
-
-/* Variant of dfloat{32,64,128}_type_node only used for fundamental
-   rtti purposes if DFP is disabled.  */
-#define fallback_dfloat32_type		cp_global_trees[CPTI_FALLBACK_DFLOAT32_TYPE]
-#define fallback_dfloat64_type		cp_global_trees[CPTI_FALLBACK_DFLOAT64_TYPE]
-#define fallback_dfloat128_type		cp_global_trees[CPTI_FALLBACK_DFLOAT128_TYPE]
-
 \f
 #include "name-lookup.h"
 
--- gcc/cp/rtti.cc.jj	2023-02-28 11:28:56.579180090 +0100
+++ gcc/cp/rtti.cc	2023-03-02 11:49:41.380484925 +0100
@@ -1577,6 +1577,15 @@ emit_support_tinfo_1 (tree bltn)
 	  gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
 	  DECL_INTERFACE_KNOWN (tinfo) = 1;
 	}
+
+      /* Emit it right away if not emitted already.  */
+      if (DECL_INITIAL (tinfo) == NULL_TREE)
+	{
+	  gcc_assert (unemitted_tinfo_decls->last () == tinfo);
+	  bool ok = emit_tinfo_decl (tinfo);
+	  gcc_assert (ok);
+	  unemitted_tinfo_decls->pop ();
+	}
     }
 }
 
@@ -1602,12 +1611,18 @@ emit_support_tinfos (void)
     &long_integer_type_node, &long_unsigned_type_node,
     &long_long_integer_type_node, &long_long_unsigned_type_node,
     &float_type_node, &double_type_node, &long_double_type_node,
-    &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
     &bfloat16_type_node, &float16_type_node, &float32_type_node,
     &float64_type_node, &float128_type_node, &float32x_type_node,
     &float64x_type_node, &float128x_type_node, &nullptr_type_node,
     0
   };
+  /* Similar, but for floating point types only which should get type info
+     regardless whether they are non-NULL or NULL.  */
+  static tree *const fundamentals_with_fallback[] =
+  {
+    &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
+    0
+  };
   int ix;
 
   /* Look for a defined class.  */
@@ -1627,8 +1642,20 @@ emit_support_tinfos (void)
   location_t saved_loc = input_location;
   input_location = BUILTINS_LOCATION;
   doing_runtime = 1;
+  tree fallback = NULL_TREE;
   for (ix = 0; fundamentals[ix]; ix++)
     emit_support_tinfo_1 (*fundamentals[ix]);
+  for (ix = 0; fundamentals_with_fallback[ix]; ix++)
+    if (*fundamentals_with_fallback[ix])
+      emit_support_tinfo_1 (*fundamentals_with_fallback[ix]);
+    else
+      {
+	if (fallback == NULL_TREE)
+	  fallback = make_node (REAL_TYPE);
+	*fundamentals_with_fallback[ix] = fallback;
+	emit_support_tinfo_1 (fallback);
+	*fundamentals_with_fallback[ix] = NULL_TREE;
+      }
   for (ix = 0; ix < NUM_INT_N_ENTS; ix ++)
     if (int_n_enabled_p[ix])
       {
@@ -1637,20 +1664,10 @@ emit_support_tinfos (void)
       }
   for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
     emit_support_tinfo_1 (TREE_VALUE (t));
-  /* For compatibility, emit DFP typeinfos even when DFP isn't enabled,
-     because we've emitted that in the past.  */
-  if (!targetm.decimal_float_supported_p ())
-    {
-      gcc_assert (dfloat32_type_node == NULL_TREE
-		  && dfloat64_type_node == NULL_TREE
-		  && dfloat128_type_node == NULL_TREE);
-      fallback_dfloat32_type = make_node (REAL_TYPE);
-      fallback_dfloat64_type = make_node (REAL_TYPE);
-      fallback_dfloat128_type = make_node (REAL_TYPE);
-      emit_support_tinfo_1 (fallback_dfloat32_type);
-      emit_support_tinfo_1 (fallback_dfloat64_type);
-      emit_support_tinfo_1 (fallback_dfloat128_type);
-    }
+
+  /* Emit additional typeinfos as requested by target.  */
+  targetm.emit_support_tinfos (emit_support_tinfo_1);
+
   input_location = saved_loc;
 }
 
--- gcc/cp/mangle.cc.jj	2023-02-28 11:28:56.532180773 +0100
+++ gcc/cp/mangle.cc	2023-03-02 11:45:41.973008607 +0100
@@ -2732,11 +2732,11 @@ write_builtin_type (tree type)
 	write_char ('d');
       else if (type == long_double_type_node)
 	write_char ('e');
-      else if (type == dfloat32_type_node || type == fallback_dfloat32_type)
+      else if (type == dfloat32_type_node)
 	write_string ("Df");
-      else if (type == dfloat64_type_node || type == fallback_dfloat64_type)
+      else if (type == dfloat64_type_node)
 	write_string ("Dd");
-      else if (type == dfloat128_type_node || type == fallback_dfloat128_type)
+      else if (type == dfloat128_type_node)
 	write_string ("De");
       else if (type == float16_type_node)
 	write_string ("DF16_");
@@ -2752,6 +2752,8 @@ write_builtin_type (tree type)
 	write_string ("DF64x");
       else if (type == float128x_type_node)
 	write_string ("DF128x");
+      else if (type == bfloat16_type_node)
+	write_string ("DF16b");
       else
 	gcc_unreachable ();
       break;


	Jakub


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] c++, v3: Emit fundamental tinfos for _Float16/decltype(0.0bf16) types on ia32 with -mno-sse2 [PR108883]
  2023-03-02 11:20       ` [PATCH] c++, v3: Emit fundamental tinfos for _Float16/decltype(0.0bf16) types on ia32 with -mno-sse2 [PR108883] Jakub Jelinek
@ 2023-03-02 16:32         ` Jason Merrill
  0 siblings, 0 replies; 8+ messages in thread
From: Jason Merrill @ 2023-03-02 16:32 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jonathan Wakely, gcc-patches

On 3/2/23 06:20, Jakub Jelinek wrote:
> Hi!
> 
> On Wed, Mar 01, 2023 at 05:50:47PM -0500, Jason Merrill wrote:
>>> And then there is a question whether we want to emit rtti for
>>> _Float{16,32,64,128}, _Float{32,64,128}x and decltype(0.0bf16) regardless
>>> of whether the target supports them at all or not.
>>> Emitting them always would have an advantage, if say bfloat16_t support
>>> isn't added for aarch64 for GCC 13 (it is still pending review), we wouldn't
>>> need to deal with symbol versioning for it in GCC 14 or later.
>>> On the other side, on some arches some types are very unlikely to be
>>> supported.  And e.g. _Float128x isn't supported on any arch right now.
>>
>> A good point.  Incidentally, it seems problematic for embedded users that
>> all the fundamental type_infos are emitted in the same .o, making it hard to
>> link in only the ones you care about.  And new floating-point variants add
>> to that problem.  So perhaps until that is addressed, it's better to avoid
>> adding a bunch more on targets that don't support them.
> 
> Ok, so here is a variant of the patch which still drops the fallback_* stuff,
> but for float*_type_node doesn't do the automatic fallback in generic code
> and leaves those to a target hook.
> 
> So far lightly tested on x86_64-linux -m32/-m64:
> 
> 2023-03-02  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR target/108883
> gcc/
> 	* target.h (emit_support_tinfos_callback): New typedef.
> 	* targhooks.h (default_emit_support_tinfos): Declare.
> 	* targhooks.cc (default_emit_support_tinfos): New function.
> 	* target.def (emit_support_tinfos): New target hook.
> 	* doc/tm.texi.in (emit_support_tinfos): Document it.
> 	* doc/tm.texi: Regenerated.
> 	* config/i386/i386.cc (ix86_emit_support_tinfos): New function.
> 	(TARGET_EMIT_SUPPORT_TINFOS): Redefine.
> gcc/cp/
> 	* cp-tree.h (enum cp_tree_index): Remove CPTI_FALLBACK_DFLOAT*_TYPE
> 	enumerators.
> 	(fallback_dfloat32_type, fallback_dfloat64_type,
> 	fallback_dfloat128_type): Remove.
> 	* rtti.cc (emit_support_tinfo_1): If not emitted already, call
> 	emit_tinfo_decl and remove from unemitted_tinfo_decls right away.
> 	(emit_support_tinfos): Move &dfloat*_type_node from fundamentals array
> 	into new fundamentals_with_fallback array.  Call emit_support_tinfo_1
> 	on elements of that array too, with the difference that if
> 	the type is NULL, use a fallback REAL_TYPE for it temporarily.
> 	Drop the !targetm.decimal_float_supported_p () handling.  Call
> 	targetm.emit_support_tinfos at the end.
> 	* mangle.cc (write_builtin_type): Remove references to
> 	fallback_dfloat*_type.  Handle bfloat16_type_node mangling.
> 
> --- gcc/target.h.jj	2023-02-17 12:45:08.056638510 +0100
> +++ gcc/target.h	2023-03-02 12:06:59.248146213 +0100
> @@ -260,6 +260,8 @@ enum poly_value_estimate_kind
>     POLY_VALUE_LIKELY
>   };
>   
> +typedef void (*emit_support_tinfos_callback) (tree);
> +
>   extern bool verify_type_context (location_t, type_context_kind, const_tree,
>   				 bool = false);
>   
> --- gcc/targhooks.h.jj	2023-01-02 09:32:50.422880177 +0100
> +++ gcc/targhooks.h	2023-03-02 12:06:22.559686384 +0100
> @@ -98,6 +98,8 @@ extern int default_builtin_vectorization
>   
>   extern tree default_builtin_reciprocal (tree);
>   
> +extern void default_emit_support_tinfos (emit_support_tinfos_callback);
> +
>   extern HOST_WIDE_INT default_static_rtx_alignment (machine_mode);
>   extern HOST_WIDE_INT default_constant_alignment (const_tree, HOST_WIDE_INT);
>   extern HOST_WIDE_INT constant_alignment_word_strings (const_tree,
> --- gcc/targhooks.cc.jj	2023-01-02 09:32:52.591848839 +0100
> +++ gcc/targhooks.cc	2023-03-02 12:01:39.576868114 +0100
> @@ -752,6 +752,11 @@ default_builtin_reciprocal (tree)
>     return NULL_TREE;
>   }
>   
> +void
> +default_emit_support_tinfos (emit_support_tinfos_callback)
> +{
> +}
> +
>   bool
>   hook_bool_CUMULATIVE_ARGS_arg_info_false (cumulative_args_t,
>   					  const function_arg_info &)
> --- gcc/target.def.jj	2023-02-22 15:58:50.252996452 +0100
> +++ gcc/target.def	2023-03-02 12:01:52.002684436 +0100
> @@ -2606,6 +2606,19 @@ types.",
>    const char *, (const_tree type),
>    hook_constcharptr_const_tree_null)
>   
> +/* Temporarily add conditional target specific types for the purpose of
> +   emitting C++ fundamental type tinfos.  */
> +DEFHOOK
> +(emit_support_tinfos,
> + "If your target defines any fundamental types which depend on ISA flags,\n\
> +they might need C++ tinfo symbols in libsupc++/libstdc++ regardless of\n\
> +ISA flags the library is compiled with.\n\
> +This hook allows creating tinfo symbols even for those cases, by temporarily\n\
> +creating corresponding fundamental type trees, calling the @var{callback}\n\

"each corresponding fundamental type tree"?

OK with that change.

> +function on it and setting the type back to @code{nullptr}.",
> + void, (emit_support_tinfos_callback callback),
> + default_emit_support_tinfos)
> +
>   /* Make any adjustments to libfunc names needed for this target.  */
>   DEFHOOK
>   (init_libfuncs,
> --- gcc/doc/tm.texi.in.jj	2023-02-24 09:58:39.963508685 +0100
> +++ gcc/doc/tm.texi.in	2023-03-02 11:47:50.044125831 +0100
> @@ -1286,6 +1286,8 @@ pattern needs to support both a 32- and
>   
>   @hook TARGET_MANGLE_TYPE
>   
> +@hook TARGET_EMIT_SUPPORT_TINFOS
> +
>   @node Type Layout
>   @section Layout of Source Language Data Types
>   
> --- gcc/doc/tm.texi.jj	2023-02-24 09:58:39.951508859 +0100
> +++ gcc/doc/tm.texi	2023-03-02 12:02:18.312295512 +0100
> @@ -1525,6 +1525,15 @@ appropriate for a target that does not d
>   types.
>   @end deftypefn
>   
> +@deftypefn {Target Hook} void TARGET_EMIT_SUPPORT_TINFOS (emit_support_tinfos_callback @var{callback})
> +If your target defines any fundamental types which depend on ISA flags,
> +they might need C++ tinfo symbols in libsupc++/libstdc++ regardless of
> +ISA flags the library is compiled with.
> +This hook allows creating tinfo symbols even for those cases, by temporarily
> +creating corresponding fundamental type trees, calling the @var{callback}
> +function on it and setting the type back to @code{nullptr}.
> +@end deftypefn
> +
>   @node Type Layout
>   @section Layout of Source Language Data Types
>   
> --- gcc/config/i386/i386.cc.jj	2023-02-22 15:58:50.109998489 +0100
> +++ gcc/config/i386/i386.cc	2023-03-02 12:02:13.193371183 +0100
> @@ -22775,6 +22775,27 @@ ix86_mangle_type (const_tree type)
>       }
>   }
>   
> +/* Create C++ tinfo symbols for only conditionally available fundamental
> +   types.  */
> +
> +static void
> +ix86_emit_support_tinfos (emit_support_tinfos_callback callback)
> +{
> +  extern tree ix86_float16_type_node;
> +  extern tree ix86_bf16_type_node;
> +
> +  if (!TARGET_SSE2)
> +    {
> +      gcc_checking_assert (!float16_type_node && !bfloat16_type_node);
> +      float16_type_node = ix86_float16_type_node;
> +      bfloat16_type_node = ix86_bf16_type_node;
> +      callback (float16_type_node);
> +      callback (bfloat16_type_node);
> +      float16_type_node = NULL_TREE;
> +      bfloat16_type_node = NULL_TREE;
> +    }
> +}
> +
>   static GTY(()) tree ix86_tls_stack_chk_guard_decl;
>   
>   static tree
> @@ -24954,6 +24975,9 @@ ix86_libgcc_floating_mode_supported_p
>   #undef TARGET_MANGLE_TYPE
>   #define TARGET_MANGLE_TYPE ix86_mangle_type
>   
> +#undef TARGET_EMIT_SUPPORT_TINFOS
> +#define TARGET_EMIT_SUPPORT_TINFOS ix86_emit_support_tinfos
> +
>   #undef TARGET_STACK_PROTECT_GUARD
>   #define TARGET_STACK_PROTECT_GUARD ix86_stack_protect_guard
>   
> --- gcc/cp/cp-tree.h.jj	2023-03-02 08:49:09.569844225 +0100
> +++ gcc/cp/cp-tree.h	2023-03-02 11:45:41.972008622 +0100
> @@ -235,10 +235,6 @@ enum cp_tree_index
>   
>       CPTI_PSEUDO_CONTRACT_VIOLATION,
>   
> -    CPTI_FALLBACK_DFLOAT32_TYPE,
> -    CPTI_FALLBACK_DFLOAT64_TYPE,
> -    CPTI_FALLBACK_DFLOAT128_TYPE,
> -
>       CPTI_MAX
>   };
>   
> @@ -397,13 +393,6 @@ extern GTY(()) tree cp_global_trees[CPTI
>      access nodes in tree.h.  */
>   
>   #define access_default_node		null_node
> -
> -/* Variant of dfloat{32,64,128}_type_node only used for fundamental
> -   rtti purposes if DFP is disabled.  */
> -#define fallback_dfloat32_type		cp_global_trees[CPTI_FALLBACK_DFLOAT32_TYPE]
> -#define fallback_dfloat64_type		cp_global_trees[CPTI_FALLBACK_DFLOAT64_TYPE]
> -#define fallback_dfloat128_type		cp_global_trees[CPTI_FALLBACK_DFLOAT128_TYPE]
> -
>   \f
>   #include "name-lookup.h"
>   
> --- gcc/cp/rtti.cc.jj	2023-02-28 11:28:56.579180090 +0100
> +++ gcc/cp/rtti.cc	2023-03-02 11:49:41.380484925 +0100
> @@ -1577,6 +1577,15 @@ emit_support_tinfo_1 (tree bltn)
>   	  gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
>   	  DECL_INTERFACE_KNOWN (tinfo) = 1;
>   	}
> +
> +      /* Emit it right away if not emitted already.  */
> +      if (DECL_INITIAL (tinfo) == NULL_TREE)
> +	{
> +	  gcc_assert (unemitted_tinfo_decls->last () == tinfo);
> +	  bool ok = emit_tinfo_decl (tinfo);
> +	  gcc_assert (ok);
> +	  unemitted_tinfo_decls->pop ();
> +	}
>       }
>   }
>   
> @@ -1602,12 +1611,18 @@ emit_support_tinfos (void)
>       &long_integer_type_node, &long_unsigned_type_node,
>       &long_long_integer_type_node, &long_long_unsigned_type_node,
>       &float_type_node, &double_type_node, &long_double_type_node,
> -    &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
>       &bfloat16_type_node, &float16_type_node, &float32_type_node,
>       &float64_type_node, &float128_type_node, &float32x_type_node,
>       &float64x_type_node, &float128x_type_node, &nullptr_type_node,
>       0
>     };
> +  /* Similar, but for floating point types only which should get type info
> +     regardless whether they are non-NULL or NULL.  */
> +  static tree *const fundamentals_with_fallback[] =
> +  {
> +    &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
> +    0
> +  };
>     int ix;
>   
>     /* Look for a defined class.  */
> @@ -1627,8 +1642,20 @@ emit_support_tinfos (void)
>     location_t saved_loc = input_location;
>     input_location = BUILTINS_LOCATION;
>     doing_runtime = 1;
> +  tree fallback = NULL_TREE;
>     for (ix = 0; fundamentals[ix]; ix++)
>       emit_support_tinfo_1 (*fundamentals[ix]);
> +  for (ix = 0; fundamentals_with_fallback[ix]; ix++)
> +    if (*fundamentals_with_fallback[ix])
> +      emit_support_tinfo_1 (*fundamentals_with_fallback[ix]);
> +    else
> +      {
> +	if (fallback == NULL_TREE)
> +	  fallback = make_node (REAL_TYPE);
> +	*fundamentals_with_fallback[ix] = fallback;
> +	emit_support_tinfo_1 (fallback);
> +	*fundamentals_with_fallback[ix] = NULL_TREE;
> +      }
>     for (ix = 0; ix < NUM_INT_N_ENTS; ix ++)
>       if (int_n_enabled_p[ix])
>         {
> @@ -1637,20 +1664,10 @@ emit_support_tinfos (void)
>         }
>     for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
>       emit_support_tinfo_1 (TREE_VALUE (t));
> -  /* For compatibility, emit DFP typeinfos even when DFP isn't enabled,
> -     because we've emitted that in the past.  */
> -  if (!targetm.decimal_float_supported_p ())
> -    {
> -      gcc_assert (dfloat32_type_node == NULL_TREE
> -		  && dfloat64_type_node == NULL_TREE
> -		  && dfloat128_type_node == NULL_TREE);
> -      fallback_dfloat32_type = make_node (REAL_TYPE);
> -      fallback_dfloat64_type = make_node (REAL_TYPE);
> -      fallback_dfloat128_type = make_node (REAL_TYPE);
> -      emit_support_tinfo_1 (fallback_dfloat32_type);
> -      emit_support_tinfo_1 (fallback_dfloat64_type);
> -      emit_support_tinfo_1 (fallback_dfloat128_type);
> -    }
> +
> +  /* Emit additional typeinfos as requested by target.  */
> +  targetm.emit_support_tinfos (emit_support_tinfo_1);
> +
>     input_location = saved_loc;
>   }
>   
> --- gcc/cp/mangle.cc.jj	2023-02-28 11:28:56.532180773 +0100
> +++ gcc/cp/mangle.cc	2023-03-02 11:45:41.973008607 +0100
> @@ -2732,11 +2732,11 @@ write_builtin_type (tree type)
>   	write_char ('d');
>         else if (type == long_double_type_node)
>   	write_char ('e');
> -      else if (type == dfloat32_type_node || type == fallback_dfloat32_type)
> +      else if (type == dfloat32_type_node)
>   	write_string ("Df");
> -      else if (type == dfloat64_type_node || type == fallback_dfloat64_type)
> +      else if (type == dfloat64_type_node)
>   	write_string ("Dd");
> -      else if (type == dfloat128_type_node || type == fallback_dfloat128_type)
> +      else if (type == dfloat128_type_node)
>   	write_string ("De");
>         else if (type == float16_type_node)
>   	write_string ("DF16_");
> @@ -2752,6 +2752,8 @@ write_builtin_type (tree type)
>   	write_string ("DF64x");
>         else if (type == float128x_type_node)
>   	write_string ("DF128x");
> +      else if (type == bfloat16_type_node)
> +	write_string ("DF16b");
>         else
>   	gcc_unreachable ();
>         break;
> 
> 
> 	Jakub
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-02 16:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 10:23 [PATCH] c++: Add target hook for emit_support_tinfos [PR108883] Jakub Jelinek
2023-02-27 23:26 ` Jason Merrill
2023-02-27 23:51   ` Jakub Jelinek
2023-02-28 10:04     ` [PATCH] c++: Emit fundamental tinfos for all _Float*/decltype(0.0bf16) types unconditionally [PR108883] Jakub Jelinek
2023-03-01  9:19       ` [PATCH] c++, v2: " Jakub Jelinek
2023-03-01 22:50     ` [PATCH] c++: Add target hook for emit_support_tinfos [PR108883] Jason Merrill
2023-03-02 11:20       ` [PATCH] c++, v3: Emit fundamental tinfos for _Float16/decltype(0.0bf16) types on ia32 with -mno-sse2 [PR108883] Jakub Jelinek
2023-03-02 16:32         ` Jason Merrill

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).