From 1a07229414e590ca4fe245fc3e05550b58df5ff5 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 6 Jul 2011 10:03:05 +0000 Subject: [PATCH] tree.c (build_common_tree_nodes_2): Merge with build_common_tree_nodes. 2011-07-06 Richard Guenther * tree.c (build_common_tree_nodes_2): Merge with build_common_tree_nodes. * tree.h (build_common_tree_nodes): Adjust prototype. (build_common_tree_nodes_2): Remove. * doc/tm.texi.in (lang_hooks.builtin_function): Adjust. * doc/tm.texi (lang_hooks.builtin_function): Regenerate. c-family/ * c-common.c (c_common_nodes_and_builtins): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. fortran/ * f95-lang.c (gfc_init_decl_processing): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. go/ * go-lang.c (go_langhook_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. java/ * decl.c (java_init_decl_processing): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. lto/ * lto-lang.c (lto_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. ada/ * gcc-interface/misc.c (gnat_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. Re-initialize boolean_false_node. From-SVN: r175906 --- gcc/ChangeLog | 9 +++++++++ gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/misc.c | 4 ++-- gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-common.c | 3 +-- gcc/doc/tm.texi | 2 +- gcc/doc/tm.texi.in | 2 +- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/f95-lang.c | 3 +-- gcc/go/ChangeLog | 5 +++++ gcc/go/go-lang.c | 4 +--- gcc/java/ChangeLog | 5 +++++ gcc/java/decl.c | 5 +---- gcc/lto/ChangeLog | 5 +++++ gcc/lto/lto-lang.c | 4 +--- gcc/tree.c | 13 ++++--------- gcc/tree.h | 3 +-- 17 files changed, 54 insertions(+), 29 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4d1c48036f..15e99e4fbeb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-07-06 Richard Guenther + + * tree.c (build_common_tree_nodes_2): Merge with + build_common_tree_nodes. + * tree.h (build_common_tree_nodes): Adjust prototype. + (build_common_tree_nodes_2): Remove. + * doc/tm.texi.in (lang_hooks.builtin_function): Adjust. + * doc/tm.texi (lang_hooks.builtin_function): Regenerate. + 2011-07-05 Jakub Jelinek PR tree-optimization/49618 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9e778c102c5..66bc3e031d3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2011-07-06 Richard Guenther + + * gcc-interface/misc.c (gnat_init): + Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. + Re-initialize boolean_false_node. + 2011-07-02 Eric Botcazou Olivier Hainque Nicolas Setton diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index e69668ae852..22516522d4d 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -307,7 +307,7 @@ gnat_init (void) /* Do little here, most of the standard declarations are set up after the front-end has been run. Use the same `char' as C, this doesn't really matter since we'll use the explicit `unsigned char' for Character. */ - build_common_tree_nodes (flag_signed_char); + build_common_tree_nodes (flag_signed_char, false); /* In Ada, we use an unsigned 8-bit type for the default boolean type. */ boolean_type_node = make_unsigned_type (8); @@ -316,10 +316,10 @@ gnat_init (void) build_int_cst (boolean_type_node, 1)); SET_TYPE_RM_SIZE (boolean_type_node, bitsize_int (1)); - build_common_tree_nodes_2 (0); sbitsize_one_node = sbitsize_int (1); sbitsize_unit_node = sbitsize_int (BITS_PER_UNIT); boolean_true_node = TYPE_MAX_VALUE (boolean_type_node); + boolean_false_node = TYPE_MIN_VALUE (boolean_type_node); ptr_void_type_node = build_pointer_type (void_type_node); diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 71beebc85e8..1e3ca7d1d6a 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2011-07-06 Richard Guenther + + * c-common.c (c_common_nodes_and_builtins): + Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. + 2011-07-05 Richard Guenther * c-common.c (c_common_nodes_and_builtins): Build all common diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index f4dba83841b..67291de7d4a 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -4576,8 +4576,7 @@ c_common_nodes_and_builtins (void) tree va_list_ref_type_node; tree va_list_arg_type_node; - build_common_tree_nodes (flag_signed_char); - build_common_tree_nodes_2 (flag_short_double); + build_common_tree_nodes (flag_signed_char, flag_short_double); /* Define `int' and `char' first so that dbx will output them first. */ record_builtin_type (RID_INT, NULL, integer_type_node); diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 341628bb3ea..ae90184b4f1 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -10876,7 +10876,7 @@ instructions or prefetch instructions). To create a built-in function, call the function @code{lang_hooks.builtin_function} which is defined by the language front end. You can use any type nodes set -up by @code{build_common_tree_nodes} and @code{build_common_tree_nodes_2}; +up by @code{build_common_tree_nodes}; only language front ends that use those two functions will call @samp{TARGET_INIT_BUILTINS}. @end deftypefn diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index f7c16e9859f..254ddc2c90d 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -10783,7 +10783,7 @@ instructions or prefetch instructions). To create a built-in function, call the function @code{lang_hooks.builtin_function} which is defined by the language front end. You can use any type nodes set -up by @code{build_common_tree_nodes} and @code{build_common_tree_nodes_2}; +up by @code{build_common_tree_nodes}; only language front ends that use those two functions will call @samp{TARGET_INIT_BUILTINS}. @end deftypefn diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 001a4bf1ed9..90a95d031f8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2011-07-06 Richard Guenther + + * f95-lang.c (gfc_init_decl_processing): + Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. + 2011-07-04 Jakub Jelinek PR fortran/49623 diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index fea76102c35..648831f2607 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -588,9 +588,8 @@ gfc_init_decl_processing (void) /* Build common tree nodes. char_type_node is unsigned because we only use it for actual characters, not for INTEGER(1). Also, we want double_type_node to actually have double precision. */ - build_common_tree_nodes (false); + build_common_tree_nodes (false, false); - build_common_tree_nodes_2 (0); void_list_node = build_tree_list (NULL_TREE, void_type_node); /* Set up F95 type nodes. */ diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 20385d1ea8e..fb26cabfc31 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,8 @@ +2011-07-06 Richard Guenther + + * go-lang.c (go_langhook_init): + Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. + 2011-06-14 Joseph Myers * Make-lang.in (go/go-lang.o, go/go-backend.o): Update diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index 576e35f7551..6abe3b84789 100644 --- a/gcc/go/go-lang.c +++ b/gcc/go/go-lang.c @@ -86,9 +86,7 @@ struct GTY(()) language_function static bool go_langhook_init (void) { - build_common_tree_nodes (false); - - build_common_tree_nodes_2 (0); + build_common_tree_nodes (false, false); /* We must create the gogo IR after calling build_common_tree_nodes (because Gogo::define_builtin_function_trees refers indirectly diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 98dd104b2bb..b3e3ec66c83 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2011-07-06 Richard Guenther + + * decl.c (java_init_decl_processing): + Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. + 2011-06-21 Andrew MacLeod * builtins.c: Add sync_ or SYNC__ to builtin names. diff --git a/gcc/java/decl.c b/gcc/java/decl.c index e4a3db240d4..179a2c3e9aa 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -567,10 +567,7 @@ java_init_decl_processing (void) global_binding_level = current_binding_level; /* Build common tree nodes, Java has an unsigned char. */ - build_common_tree_nodes (false); - - /* Build the rest of the common tree nodes. */ - build_common_tree_nodes_2 (0); + build_common_tree_nodes (false, false); /* ??? Now we continue and override some of the built types again with Java specific types. As the above generated types are diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 27bc01563e3..c80b33a6b1a 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2011-07-06 Richard Guenther + + * lto-lang.c (lto_init): + Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. + 2011-06-11 Jan Hubicka PR lto/48246 diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index 8a4cee029d3..3574da02d11 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -1085,7 +1085,7 @@ lto_init (void) linemap_add (line_table, LC_RENAME, 0, NULL, 0); /* Create the basic integer types. */ - build_common_tree_nodes (flag_signed_char); + build_common_tree_nodes (flag_signed_char, /*short_double=*/false); /* The global tree for the main identifier is filled in by language-specific front-end initialization that is not run in the @@ -1102,8 +1102,6 @@ lto_init (void) ptrdiff_type_node = integer_type_node; - /* Create other basic types. */ - build_common_tree_nodes_2 (/*short_double=*/false); lto_build_c_type_nodes (); gcc_assert (va_list_type_node); diff --git a/gcc/tree.c b/gcc/tree.c index 28720340bab..e9876dd81a1 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -9167,10 +9167,12 @@ make_or_reuse_accum_type (unsigned size, int unsignedp, int satp) } /* Create nodes for all integer types (and error_mark_node) using the sizes - of C datatypes. */ + of C datatypes. SIGNED_CHAR specifies whether char is signed, + SHORT_DOUBLE specifies whether double should be of the same precision + as float. */ void -build_common_tree_nodes (bool signed_char) +build_common_tree_nodes (bool signed_char, bool short_double) { error_mark_node = make_node (ERROR_MARK); TREE_TYPE (error_mark_node) = error_mark_node; @@ -9247,14 +9249,7 @@ build_common_tree_nodes (bool signed_char) access_public_node = get_identifier ("public"); access_protected_node = get_identifier ("protected"); access_private_node = get_identifier ("private"); -} - -/* Call this function after calling build_common_tree_nodes. - It will create several other common tree nodes. */ -void -build_common_tree_nodes_2 (int short_double) -{ /* Define these next since types below may used them. */ integer_zero_node = build_int_cst (integer_type_node, 0); integer_one_node = build_int_cst (integer_type_node, 1); diff --git a/gcc/tree.h b/gcc/tree.h index fd7d5cea109..253d489a949 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5396,8 +5396,7 @@ extern int real_onep (const_tree); extern int real_twop (const_tree); extern int real_minus_onep (const_tree); extern void init_ttree (void); -extern void build_common_tree_nodes (bool); -extern void build_common_tree_nodes_2 (int); +extern void build_common_tree_nodes (bool, bool); extern void build_common_builtin_nodes (void); extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int); extern tree build_range_type (tree, tree, tree); -- 2.30.2