From 91f2fae8cc58e1b1dae3b62e2407903190ed1af4 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 3 Apr 2011 11:11:25 +0000 Subject: [PATCH] tree.c (decl_init_priority_insert): Don't create entry for default priority. * tree.c (decl_init_priority_insert): Don't create entry for default priority. (decl_fini_priority_insert): Ditto. (fields_compatible_p, find_compatible_field): Remove. * tree.h (fields_compatible_p, find_compatible_field): Remove. * gimple.c (gimple_compare_field_offset): Adjust block comment. From-SVN: r171902 --- gcc/ChangeLog | 15 ++++++++++++--- gcc/gimple.c | 3 +-- gcc/tree.c | 48 ++++-------------------------------------------- gcc/tree.h | 3 --- 4 files changed, 17 insertions(+), 52 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e746e1d043a..801e52bd227 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,9 +1,18 @@ +2011-04-03 Michael Matz + + * tree.c (decl_init_priority_insert): Don't create entry for + default priority. + (decl_fini_priority_insert): Ditto. + (fields_compatible_p, find_compatible_field): Remove. + * tree.h (fields_compatible_p, find_compatible_field): Remove. + * gimple.c (gimple_compare_field_offset): Adjust block comment. + 2011-04-03 Eric Botcazou * combine.c (try_combine): Remove useless local variable. 2011-04-03 Richard Guenther - Ira Rosen + Ira Rosen * tree-if-conv.c (memrefs_read_or_written_unconditionally): Strip all non-variable offsets and compare the remaining bases of the two @@ -25,8 +34,8 @@ (x86_output_mi_thunk): Likewise. 2011-04-01 Olivier Hainque - Nicolas Setton - Eric Botcazou + Nicolas Setton + Eric Botcazou * dwarf2out.c (dwarf_attr_name): Map DW_AT_GNAT_descriptive_type. (add_gnat_descriptive_type_attribute): New function. diff --git a/gcc/gimple.c b/gcc/gimple.c index 7f29bd01e40..fe76942551a 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3306,8 +3306,7 @@ compare_type_names_p (tree t1, tree t2, bool for_completion_p) /* Return true if the field decls F1 and F2 are at the same offset. - This is intended to be used on GIMPLE types only. In order to - compare GENERIC types, use fields_compatible_p instead. */ + This is intended to be used on GIMPLE types only. */ bool gimple_compare_field_offset (tree f1, tree f2) diff --git a/gcc/tree.c b/gcc/tree.c index 69d5ecbb700..eec4a8b2905 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5913,6 +5913,8 @@ decl_init_priority_insert (tree decl, priority_type priority) struct tree_priority_map *h; gcc_assert (VAR_OR_FUNCTION_DECL_P (decl)); + if (priority == DEFAULT_INIT_PRIORITY) + return; h = decl_priority_info (decl); h->init = priority; } @@ -5925,6 +5927,8 @@ decl_fini_priority_insert (tree decl, priority_type priority) struct tree_priority_map *h; gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); + if (priority == DEFAULT_INIT_PRIORITY) + return; h = decl_priority_info (decl); h->fini = priority; } @@ -9893,50 +9897,6 @@ needs_to_live_in_memory (const_tree t) && aggregate_value_p (t, current_function_decl))); } -/* There are situations in which a language considers record types - compatible which have different field lists. Decide if two fields - are compatible. It is assumed that the parent records are compatible. */ - -bool -fields_compatible_p (const_tree f1, const_tree f2) -{ - if (!operand_equal_p (DECL_FIELD_BIT_OFFSET (f1), - DECL_FIELD_BIT_OFFSET (f2), OEP_ONLY_CONST)) - return false; - - if (!operand_equal_p (DECL_FIELD_OFFSET (f1), - DECL_FIELD_OFFSET (f2), OEP_ONLY_CONST)) - return false; - - if (!types_compatible_p (TREE_TYPE (f1), TREE_TYPE (f2))) - return false; - - return true; -} - -/* Locate within RECORD a field that is compatible with ORIG_FIELD. */ - -tree -find_compatible_field (tree record, tree orig_field) -{ - tree f; - - for (f = TYPE_FIELDS (record); f ; f = TREE_CHAIN (f)) - if (TREE_CODE (f) == FIELD_DECL - && fields_compatible_p (f, orig_field)) - return f; - - /* ??? Why isn't this on the main fields list? */ - f = TYPE_VFIELD (record); - if (f && TREE_CODE (f) == FIELD_DECL - && fields_compatible_p (f, orig_field)) - return f; - - /* ??? We should abort here, but Java appears to do Bad Things - with inherited fields. */ - return orig_field; -} - /* Return value of a constant X and sign-extend it. */ HOST_WIDE_INT diff --git a/gcc/tree.h b/gcc/tree.h index ac5e544abe3..b50336190f9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5228,9 +5228,6 @@ extern bool subrange_type_for_debug_p (const_tree, tree *, tree *); extern HOST_WIDE_INT int_cst_value (const_tree); extern HOST_WIDEST_INT widest_int_cst_value (const_tree); -extern bool fields_compatible_p (const_tree, const_tree); -extern tree find_compatible_field (tree, tree); - extern tree *tree_block (tree); extern location_t *block_nonartificial_location (tree); extern location_t tree_nonartificial_location (tree); -- 2.30.2