This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix decimal floating-point LTO streaming for offloading compilation
- From: Julian Brown <julian at codesourcery dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, Thomas Schwinge <thomas at codesourcery dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Thu, 28 Nov 2019 18:21:29 +0000
- Subject: Re: [PATCH] Fix decimal floating-point LTO streaming for offloading compilation
- Ironport-sdr: kvGFSPe+IW+60l4L0veXP1LGtcaQMBkA7fDbUY9XZXe8lRlUCvBgRFyPH44eCGyl83pPFxu/8O VW/xmNGN54+mQTAAgmD77CWwhBNuxTuExPoZPybOL7aMXQtBawyjSXkQHEWbwlNiONsQ3Y5x6s AnMcFDyokBcqr6THSJHqBkD9Yk7dTa7kNh48hRZ2cs/DO/JB0ufpDVDMfYKQvZx2PDqjgXHcWp f0Nm0BDOWd9b4sfbRr1QVz6EzNYQazJ9rFsUlKCvn/zINLDWgeN7HkHiHoYc3Ub8pg18brWcXt tJ0=
- Ironport-sdr: JnRS/ZoOEfola6gjVZLNIovdXa+QsPgjGTcVqbYoEjk57CJd3oSUb2PWOLu+sIQOo45uovxakd 3Ui2DJqNbimP25m8JTpSTCtKHUGhLqWNeqjXNtAnYxzD+/G8ROZuqfGJMrcYOO+a5bHYWxkH0+ RGw0EO8hqVglaBR9bTv3vkwoXfBvmY5kXaMf/dDzWS9xKqNYtuhHRWbXFErP3SsJQyZszK7X7v tUz6ARdfH/fMluypQURfSet52ub67NQFDR9tPRnOjy9b8fLUsXgKg6A8fbzN2OnaIUHI0quYIh OwY=
- References: <20191128142402.2949931d@squid.athome> <alpine.DEB.2.21.1911281500410.22734@digraph.polyomino.org.uk>
On Thu, 28 Nov 2019 15:04:05 +0000
Joseph Myers <joseph@codesourcery.com> wrote:
> On Thu, 28 Nov 2019, Julian Brown wrote:
>
> > Unlike e.g. the _FloatN types, when decimal floating-point types are
> > enabled, common tree nodes are created for each float type size
> > (e.g. dfloat32_type_node) and also a pointer to each type is created
> > (e.g. dfloat32_ptr_type_node). tree-streamer.c:record_common_node
> > emits these like:
>
> As far as I can tell, nothing actually uses those pointer nodes, or
> the corresponding BT_DFLOAT32_PTR etc. defined in builtin-types.def.
> I don't know if they ever were used, or if they were just added by
> analogy to e.g. float_ptr_type_node.
>
> So I'd suggest simply removing all references to those tree nodes and
> corresponding BT_*, from builtin-types.def, jit/jit-builtins.c
> (commented out), tree-core.h, tree.c, tree.h. Hopefully that will
> solve the offloading problem.
Thanks for review. How about this (lightly retested so far), assuming
it passes full testing/bootstrap?
Thanks,
Julian
ChangeLog
gcc/
* builtin-types.def (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR,
BT_DFLOAT128_PTR) Remove.
* tree-core.h (TI_DFLOAT32_PTR_TYPE, TI_DFLOAT64_PTR_TYPE,
TI_DFLOAT128_PTR_TYPE): Remove.
* tree.c (build_common_type_nodes): Remove dfloat32_ptr_type_node,
dfloat64_ptr_type_node and dfloat128_ptr_type_node initialisation.
* tree.h (dfloat32_ptr_type_node, dfloat64_ptr_type_node,
dfloat128_ptr_type_node): Remove macros.
gcc/jit/
* jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
Remove commented-out cases.
commit 80f69450724dbbf944a0d1e62e3ca6bdc3dd5a82
Author: Julian Brown <julian@codesourcery.com>
Date: Wed Nov 27 18:41:56 2019 -0800
Remove unused decimal floating-point pointer types
gcc/
* builtin-types.def (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR,
BT_DFLOAT128_PTR) Remove.
* tree-core.h (TI_DFLOAT32_PTR_TYPE, TI_DFLOAT64_PTR_TYPE,
TI_DFLOAT128_PTR_TYPE): Remove.
* tree.c (build_common_type_nodes): Remove dfloat32_ptr_type_node,
dfloat64_ptr_type_node and dfloat128_ptr_type_node initialisation.
* tree.h (dfloat32_ptr_type_node, dfloat64_ptr_type_node,
dfloat128_ptr_type_node): Remove macros.
gcc/jit/
* jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
Remove commented-out cases.
diff --git a/gcc/builtin-types.def b/gcc/builtin-types.def
index 800b751de6d..2611e88da60 100644
--- a/gcc/builtin-types.def
+++ b/gcc/builtin-types.def
@@ -145,15 +145,6 @@ DEF_PRIMITIVE_TYPE (BT_DFLOAT64, (dfloat64_type_node
DEF_PRIMITIVE_TYPE (BT_DFLOAT128, (dfloat128_type_node
? dfloat128_type_node
: error_mark_node))
-DEF_PRIMITIVE_TYPE (BT_DFLOAT32_PTR, (dfloat32_ptr_type_node
- ? dfloat32_ptr_type_node
- : error_mark_node))
-DEF_PRIMITIVE_TYPE (BT_DFLOAT64_PTR, (dfloat64_ptr_type_node
- ? dfloat64_ptr_type_node
- : error_mark_node))
-DEF_PRIMITIVE_TYPE (BT_DFLOAT128_PTR, (dfloat128_ptr_type_node
- ? dfloat128_ptr_type_node
- : error_mark_node))
DEF_PRIMITIVE_TYPE (BT_VALIST_REF, va_list_ref_type_node)
DEF_PRIMITIVE_TYPE (BT_VALIST_ARG, va_list_arg_type_node)
diff --git a/gcc/jit/jit-builtins.c b/gcc/jit/jit-builtins.c
index 850329c7b36..93d48c64c40 100644
--- a/gcc/jit/jit-builtins.c
+++ b/gcc/jit/jit-builtins.c
@@ -434,9 +434,6 @@ builtins_manager::make_primitive_type (enum jit_builtin_type type_id)
// case BT_DFLOAT32:
// case BT_DFLOAT64:
// case BT_DFLOAT128:
- // case BT_DFLOAT32_PTR:
- // case BT_DFLOAT64_PTR:
- // case BT_DFLOAT128_PTR:
// case BT_VALIST_REF:
// case BT_VALIST_ARG:
// case BT_I1:
diff --git a/gcc/tree-core.h b/gcc/tree-core.h
index 12e078882da..f76f68d835d 100644
--- a/gcc/tree-core.h
+++ b/gcc/tree-core.h
@@ -695,9 +695,6 @@ enum tree_index {
TI_DFLOAT32_TYPE,
TI_DFLOAT64_TYPE,
TI_DFLOAT128_TYPE,
- TI_DFLOAT32_PTR_TYPE,
- TI_DFLOAT64_PTR_TYPE,
- TI_DFLOAT128_PTR_TYPE,
TI_VOID_LIST_NODE,
diff --git a/gcc/tree.c b/gcc/tree.c
index 5ae250ee595..789f0a00f41 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -10340,19 +10340,16 @@ build_common_tree_nodes (bool signed_char)
TYPE_PRECISION (dfloat32_type_node) = DECIMAL32_TYPE_SIZE;
SET_TYPE_MODE (dfloat32_type_node, SDmode);
layout_type (dfloat32_type_node);
- dfloat32_ptr_type_node = build_pointer_type (dfloat32_type_node);
dfloat64_type_node = make_node (REAL_TYPE);
TYPE_PRECISION (dfloat64_type_node) = DECIMAL64_TYPE_SIZE;
SET_TYPE_MODE (dfloat64_type_node, DDmode);
layout_type (dfloat64_type_node);
- dfloat64_ptr_type_node = build_pointer_type (dfloat64_type_node);
dfloat128_type_node = make_node (REAL_TYPE);
TYPE_PRECISION (dfloat128_type_node) = DECIMAL128_TYPE_SIZE;
SET_TYPE_MODE (dfloat128_type_node, TDmode);
layout_type (dfloat128_type_node);
- dfloat128_ptr_type_node = build_pointer_type (dfloat128_type_node);
}
complex_integer_type_node = build_complex_type (integer_type_node, true);
diff --git a/gcc/tree.h b/gcc/tree.h
index 60b6eae7b04..0f3cc5d7e5a 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4098,9 +4098,6 @@ tree_strip_any_location_wrapper (tree exp)
#define dfloat32_type_node global_trees[TI_DFLOAT32_TYPE]
#define dfloat64_type_node global_trees[TI_DFLOAT64_TYPE]
#define dfloat128_type_node global_trees[TI_DFLOAT128_TYPE]
-#define dfloat32_ptr_type_node global_trees[TI_DFLOAT32_PTR_TYPE]
-#define dfloat64_ptr_type_node global_trees[TI_DFLOAT64_PTR_TYPE]
-#define dfloat128_ptr_type_node global_trees[TI_DFLOAT128_PTR_TYPE]
/* The fixed-point types. */
#define sat_short_fract_type_node global_trees[TI_SAT_SFRACT_TYPE]