From: Richard Henderson Date: Wed, 18 Aug 2004 18:32:04 +0000 (-0700) Subject: alias.c (readonly_fields_p): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4766261de9346c0521b688b1b330a199edbe17e0;p=gcc.git alias.c (readonly_fields_p): Remove. * alias.c (readonly_fields_p): Remove. (objects_must_conflict_p): Don't call it. * tree.h (readonly_fields_p): Remove. * langhooks.h (struct lang_hooks): Remove honor_readonly. * langhooks-def.h (LANG_HOOKS_HONOR_READONLY): Remove. ada/ * misc.c (LANG_HOOKS_HONOR_READONLY): Remove. From-SVN: r86200 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4e6bc38b7c..4445787e4af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-08-18 Richard Henderson + + * alias.c (readonly_fields_p): Remove. + (objects_must_conflict_p): Don't call it. + * tree.h (readonly_fields_p): Remove. + * langhooks.h (struct lang_hooks): Remove honor_readonly. + * langhooks-def.h (LANG_HOOKS_HONOR_READONLY): Remove. + 2004-08-18 Diego Novillo * tree-dfa.c (add_referenced_var): Only global variables are diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4b5107396db..7bc0828143e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2004-08-18 Richard Henderson + + * misc.c (LANG_HOOKS_HONOR_READONLY): Remove. + 2004-08-16 Nathan Sidwell * cuintp.c (UI_To_gnu): Be more conservative with build_int_cst diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index 9aef623ed4e..58ab2b4fac7 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -122,8 +122,6 @@ static tree gnat_type_max_size (tree); #define LANG_HOOKS_POST_OPTIONS gnat_post_options #undef LANG_HOOKS_PARSE_FILE #define LANG_HOOKS_PARSE_FILE gnat_parse_file -#undef LANG_HOOKS_HONOR_READONLY -#define LANG_HOOKS_HONOR_READONLY true #undef LANG_HOOKS_HASH_TYPES #define LANG_HOOKS_HASH_TYPES false #undef LANG_HOOKS_GETDECLS diff --git a/gcc/alias.c b/gcc/alias.c index 57bc38d3c59..6807ad0726b 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -303,28 +303,6 @@ alias_sets_might_conflict_p (HOST_WIDE_INT set1, HOST_WIDE_INT set2) return 0; } - -/* Return 1 if TYPE is a RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE and has - has any readonly fields. If any of the fields have types that - contain readonly fields, return true as well. */ - -int -readonly_fields_p (tree type) -{ - tree field; - - if (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE - && TREE_CODE (type) != QUAL_UNION_TYPE) - return 0; - - for (field = TYPE_FIELDS (type); field != 0; field = TREE_CHAIN (field)) - if (TREE_CODE (field) == FIELD_DECL - && (TREE_READONLY (field) - || readonly_fields_p (TREE_TYPE (field)))) - return 1; - - return 0; -} /* Return 1 if any MEM object of type T1 will always conflict (using the dependency routines in this file) with any MEM object of type T2. @@ -342,14 +320,6 @@ objects_must_conflict_p (tree t1, tree t2) if (t1 == 0 && t2 == 0) return 0; - /* If one or the other has readonly fields or is readonly, - then they may not conflict. */ - if ((t1 != 0 && readonly_fields_p (t1)) - || (t2 != 0 && readonly_fields_p (t2)) - || (t1 != 0 && lang_hooks.honor_readonly && TYPE_READONLY (t1)) - || (t2 != 0 && lang_hooks.honor_readonly && TYPE_READONLY (t2))) - return 0; - /* If they are the same type, they must conflict. */ if (t1 == t2 /* Likewise if both are volatile. */ diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index 7efa097e9cc..d5f3a79f5e6 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -111,7 +111,6 @@ extern int lhd_gimplify_expr (tree *, tree *, tree *); #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME lhd_set_decl_assembler_name #define LANG_HOOKS_CAN_USE_BIT_FIELDS_P lhd_can_use_bit_fields_p #define LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS false -#define LANG_HOOKS_HONOR_READONLY false #define LANG_HOOKS_NO_BODY_BLOCKS false #define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing #define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing @@ -276,7 +275,6 @@ extern tree lhd_make_node (enum tree_code); LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \ LANG_HOOKS_CAN_USE_BIT_FIELDS_P, \ LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS, \ - LANG_HOOKS_HONOR_READONLY, \ LANG_HOOKS_NO_BODY_BLOCKS, \ LANG_HOOKS_PRINT_STATISTICS, \ LANG_HOOKS_PRINT_XNODE, \ diff --git a/gcc/langhooks.h b/gcc/langhooks.h index 108b4515e31..6623ff6ffe7 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -325,9 +325,6 @@ struct lang_hooks have their results reduced to the precision of the type. */ bool reduce_bit_field_operations; - /* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored. */ - bool honor_readonly; - /* Nonzero if this front end does not generate a dummy BLOCK between the outermost scope of the function and the FUNCTION_DECL. See is_body_block in stmt.c, and its callers. */ diff --git a/gcc/tree.h b/gcc/tree.h index 4afe608cf52..6c1fa2a7810 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3464,7 +3464,6 @@ extern void record_component_aliases (tree); extern HOST_WIDE_INT get_alias_set (tree); extern int alias_sets_conflict_p (HOST_WIDE_INT, HOST_WIDE_INT); extern int alias_sets_might_conflict_p (HOST_WIDE_INT, HOST_WIDE_INT); -extern int readonly_fields_p (tree); extern int objects_must_conflict_p (tree, tree); /* In tree.c */