public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work097)] Delete ieee128_float_type_node.
@ 2022-08-13  2:14 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2022-08-13  2:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:33984189c18f7e7c5dda239b5ef6870ee575c253

commit 33984189c18f7e7c5dda239b5ef6870ee575c253
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Aug 12 22:14:33 2022 -0400

    Delete ieee128_float_type_node.
    
    Now that we always use float128_type_node for __float128, we can delete the tree
    variable ieee128_float_type_node.
    
    2022-08-12   Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
    
            * config/rs6000/rs6000-builtin.cc (rs6000_type_string): Delete
            ieee128_float_type_node.
            * config/rs6000/rs6000-c.cc (rs6000_target_modify_macros): Likewise.
            (rs6000_cpu_cpp_builtins): Likewise.
            * config/rs6000/rs6000.cc (rs6000_translate_mode_attribute): Likewise.
            * config/rs6000/rs6000.h (RS6000_BTI_ieee128_float): Delete.
            (ieee128_float_type_node): Delete.

Diff:
---
 gcc/config/rs6000/rs6000-builtin.cc |  9 +++------
 gcc/config/rs6000/rs6000-c.cc       | 16 +++++++++-------
 gcc/config/rs6000/rs6000.cc         |  6 ++----
 gcc/config/rs6000/rs6000.h          |  2 --
 4 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc
index 69a2aedc5f2..0b4f72b318f 100644
--- a/gcc/config/rs6000/rs6000-builtin.cc
+++ b/gcc/config/rs6000/rs6000-builtin.cc
@@ -434,7 +434,7 @@ const char *rs6000_type_string (tree type_node)
     return "ss";
   else if (type_node == ibm128_float_type_node)
     return "__ibm128";
-  else if (type_node == ieee128_float_type_node)
+  else if (type_node == float128_type_node)
     return "__ieee128";
   else if (type_node == opaque_V4SI_type_node)
     return "opaque";
@@ -736,13 +736,10 @@ rs6000_init_builtins (void)
       /* Always make the type used by __float128 to be the same as the
 	 _Float128 type.  The C23 standard will want long double to be a
 	 different type than _Float128, so don't use the long double type.  */
-      ieee128_float_type_node = float128_type_node;
-      t = build_qualified_type (ieee128_float_type_node, TYPE_QUAL_CONST);
-      lang_hooks.types.register_builtin_type (ieee128_float_type_node,
+      t = build_qualified_type (float128_type_node, TYPE_QUAL_CONST);
+      lang_hooks.types.register_builtin_type (float128_type_node,
 					      "__ieee128");
     }
-  else
-    ieee128_float_type_node = NULL_TREE;
 
   /* Vector pair and vector quad support.  */
   vector_pair_type_node = make_node (OPAQUE_TYPE);
diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc
index 11de8389fd6..7ac5a677305 100644
--- a/gcc/config/rs6000/rs6000-c.cc
+++ b/gcc/config/rs6000/rs6000-c.cc
@@ -578,13 +578,15 @@ rs6000_target_modify_macros (bool define_p, HOST_WIDE_INT flags)
     {
       rs6000_define_or_undefine_macro (define_p, "__FLOAT128__");
       if (define_p)
-	rs6000_define_or_undefine_macro (true, "__float128=__ieee128");
-      else
-	rs6000_define_or_undefine_macro (false, "__float128");
-      if (ieee128_float_type_node && define_p)
-	rs6000_define_or_undefine_macro (true, "__SIZEOF_FLOAT128__=16");
+	{
+	  rs6000_define_or_undefine_macro (true, "__float128=__ieee128");
+	  rs6000_define_or_undefine_macro (true, "__SIZEOF_FLOAT128__=16");
+	}
       else
-	rs6000_define_or_undefine_macro (false, "__SIZEOF_FLOAT128__");
+	{
+	  rs6000_define_or_undefine_macro (false, "__float128");
+	  rs6000_define_or_undefine_macro (false, "__SIZEOF_FLOAT128__");
+	}
     }
   /* OPTION_MASK_FLOAT128_HARDWARE can be turned on if -mcpu=power9 is used or
      via the target attribute/pragma.  */
@@ -624,7 +626,7 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
     builtin_define ("__FLOAT128_TYPE__");
   if (ibm128_float_type_node)
     builtin_define ("__SIZEOF_IBM128__=16");
-  if (ieee128_float_type_node)
+  if (float128_type_node)
     builtin_define ("__SIZEOF_IEEE128__=16");
 #ifdef TARGET_LIBC_PROVIDES_HWCAP_IN_TCB
   builtin_define ("__BUILTIN_CPU_SUPPORTS__");
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 3bedea4f9e6..d3f2141b341 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -23682,10 +23682,8 @@ rs6000_eh_return_filter_mode (void)
 static machine_mode
 rs6000_translate_mode_attribute (machine_mode mode)
 {
-  if ((FLOAT128_IEEE_P (mode)
-       && ieee128_float_type_node == long_double_type_node)
-      || (FLOAT128_IBM_P (mode)
-	  && ibm128_float_type_node == long_double_type_node))
+  if ((FLOAT128_IBM_P (mode)
+       && ibm128_float_type_node == long_double_type_node))
     return COMPLEX_MODE_P (mode) ? E_TCmode : E_TFmode;
   return mode;
 }
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index f58f5f3f355..4a1f6875747 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2268,7 +2268,6 @@ enum rs6000_builtin_type_index
   RS6000_BTI_dfloat64,		 /* dfloat64_type_node */
   RS6000_BTI_dfloat128,		 /* dfloat128_type_node */
   RS6000_BTI_void,	         /* void_type_node */
-  RS6000_BTI_ieee128_float,	 /* ieee 128-bit floating point */
   RS6000_BTI_ibm128_float,	 /* IBM 128-bit floating point */
   RS6000_BTI_const_str,		 /* pointer to const char * */
   RS6000_BTI_vector_pair,	 /* unsigned 256-bit types (vector pair).  */
@@ -2363,7 +2362,6 @@ enum rs6000_builtin_type_index
 #define dfloat64_type_internal_node	 (rs6000_builtin_types[RS6000_BTI_dfloat64])
 #define dfloat128_type_internal_node	 (rs6000_builtin_types[RS6000_BTI_dfloat128])
 #define void_type_internal_node		 (rs6000_builtin_types[RS6000_BTI_void])
-#define ieee128_float_type_node		 (rs6000_builtin_types[RS6000_BTI_ieee128_float])
 #define ibm128_float_type_node		 (rs6000_builtin_types[RS6000_BTI_ibm128_float])
 #define const_str_type_node		 (rs6000_builtin_types[RS6000_BTI_const_str])
 #define vector_pair_type_node		 (rs6000_builtin_types[RS6000_BTI_vector_pair])


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-13  2:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-13  2:14 [gcc(refs/users/meissner/heads/work097)] Delete ieee128_float_type_node Michael Meissner

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