From: Nathan Sidwell Date: Wed, 19 Jul 2017 12:01:18 +0000 (+0000) Subject: tree.h (TYPE_MINVAL, [...]): Rename to ... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20deef65ae6058143c29199c1aab12d94e75181c;p=gcc.git tree.h (TYPE_MINVAL, [...]): Rename to ... gcc/ * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ... (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these. * tree.c (find_decls_types_r, verify_type): Use TYPE_{MIN,MAX}_VALUE_RAW. * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise. (hash_tree): Likewise. * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers): Likewise. * tree-streamer-out.c (write_ts_type_non_common_tree_pointers): Likewise. gcc/cp/ * cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS, PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW. gcc/lto/ * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW. (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise. gcc/objc/ * objc-act.h (CLASS_NST_METHODS, CLASS_CLS_METHODS): Use TYPE_{MIN,MAX}_VALUE_RAW. From-SVN: r250337 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54e78a62dbf..be964c6ab9e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,8 +1,21 @@ +2017-07-19 Nathan Sidwell + + * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ... + (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these. + * tree.c (find_decls_types_r, verify_type): Use + TYPE_{MIN,MAX}_VALUE_RAW. + * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise. + (hash_tree): Likewise. + * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers): + Likewise. + * tree-streamer-out.c (write_ts_type_non_common_tree_pointers): + Likewise. + 2017-07-18 Tom de Vries PR middle-end/81464 - * omp-expand.c (expand_omp_for_static_chunk): Handle equal-argument loop - exit phi. + * omp-expand.c (expand_omp_for_static_chunk): Handle + equal-argument loop exit phi. 2017-07-18 Uros Bizjak diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 256d1ee1b8c..6a87cfc2683 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2017-07-19 Nathan Sidwell + + * cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS, + PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW. + 2017-07-18 Nathan Sidwell * cp-array-notation.c (build_array_notation_ref): Use diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index abc9b65b018..c7bf4c70d7e 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3522,13 +3522,13 @@ extern void decl_shadowed_for_var_insert (tree, tree); #define PACK_EXPANSION_PARAMETER_PACKS(NODE) \ *(TREE_CODE (NODE) == EXPR_PACK_EXPANSION \ ? &TREE_OPERAND (NODE, 1) \ - : &TYPE_MINVAL (TYPE_PACK_EXPANSION_CHECK (NODE))) + : &TYPE_MIN_VALUE_RAW (TYPE_PACK_EXPANSION_CHECK (NODE))) /* Any additional template args to be applied when substituting into the pattern, set by tsubst_pack_expansion for partial instantiations. */ #define PACK_EXPANSION_EXTRA_ARGS(NODE) \ *(TREE_CODE (NODE) == TYPE_PACK_EXPANSION \ - ? &TYPE_MAXVAL (NODE) \ + ? &TYPE_MAX_VALUE_RAW (NODE) \ : &TREE_OPERAND ((NODE), 2)) /* True iff this pack expansion is within a function context. */ diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index f35dd020a51..41fba318cb5 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -835,8 +835,8 @@ DFS::DFS_write_tree_body (struct output_block *ob, DFS_follow_tree_edge (TYPE_ARG_TYPES (expr)); if (!POINTER_TYPE_P (expr)) - DFS_follow_tree_edge (TYPE_MINVAL (expr)); - DFS_follow_tree_edge (TYPE_MAXVAL (expr)); + DFS_follow_tree_edge (TYPE_MIN_VALUE_RAW (expr)); + DFS_follow_tree_edge (TYPE_MAX_VALUE_RAW (expr)); if (RECORD_OR_UNION_TYPE_P (expr)) DFS_follow_tree_edge (TYPE_BINFO (expr)); } @@ -1271,8 +1271,8 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map *map, || code == METHOD_TYPE) visit (TYPE_ARG_TYPES (t)); if (!POINTER_TYPE_P (t)) - visit (TYPE_MINVAL (t)); - visit (TYPE_MAXVAL (t)); + visit (TYPE_MIN_VALUE_RAW (t)); + visit (TYPE_MAX_VALUE_RAW (t)); if (RECORD_OR_UNION_TYPE_P (t)) visit (TYPE_BINFO (t)); } diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 667d58c886c..c8e6e4b08fe 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2017-07-19 Nathan Sidwell + + * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW. + (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise. + 2017-07-06 Jan Hubicka * lto-partition.c (lto_balanced_map): Do not check diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 44ddf419570..a3b4d13d27d 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -646,8 +646,8 @@ mentions_vars_p_type (tree t) CHECK_NO_VAR (TYPE_ATTRIBUTES (t)); CHECK_NO_VAR (TYPE_NAME (t)); - CHECK_VAR (TYPE_MINVAL (t)); - CHECK_VAR (TYPE_MAXVAL (t)); + CHECK_VAR (TYPE_MIN_VALUE_RAW (t)); + CHECK_VAR (TYPE_MAX_VALUE_RAW (t)); /* Accessor is for derived node types only. */ CHECK_NO_VAR (t->type_non_common.binfo); @@ -1414,9 +1414,10 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) else if (code == FUNCTION_TYPE || code == METHOD_TYPE) compare_tree_edges (TYPE_ARG_TYPES (t1), TYPE_ARG_TYPES (t2)); + if (!POINTER_TYPE_P (t1)) - compare_tree_edges (TYPE_MINVAL (t1), TYPE_MINVAL (t2)); - compare_tree_edges (TYPE_MAXVAL (t1), TYPE_MAXVAL (t2)); + compare_tree_edges (TYPE_MIN_VALUE_RAW (t1), TYPE_MIN_VALUE_RAW (t2)); + compare_tree_edges (TYPE_MAX_VALUE_RAW (t1), TYPE_MAX_VALUE_RAW (t2)); } if (CODE_CONTAINS_STRUCT (code, TS_LIST)) @@ -2580,8 +2581,8 @@ lto_fixup_prevailing_decls (tree t) LTO_NO_PREVAIL (TYPE_ATTRIBUTES (t)); LTO_NO_PREVAIL (TYPE_NAME (t)); - LTO_SET_PREVAIL (TYPE_MINVAL (t)); - LTO_SET_PREVAIL (TYPE_MAXVAL (t)); + LTO_SET_PREVAIL (TYPE_MIN_VALUE_RAW (t)); + LTO_SET_PREVAIL (TYPE_MAX_VALUE_RAW (t)); LTO_NO_PREVAIL (t->type_non_common.binfo); LTO_SET_PREVAIL (TYPE_CONTEXT (t)); diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 0c6f3fcd8ae..053e4d4a543 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,8 @@ +2017-07-19 Nathan Sidwell + + * objc-act.h (CLASS_NST_METHODS, CLASS_CLS_METHODS): Use + TYPE_{MIN,MAX}_VALUE_RAW. + 2017-05-16 Sylvestre Ledru * objc-runtime-shared-support.c (build_module_descriptor): diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 05ee968036b..92efd9ee45f 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -179,8 +179,8 @@ enum objc_property_assign_semantics { #define CLASS_SUPER_NAME(CLASS) (TYPE_CONTEXT (CLASS)) #define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0) #define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1) -#define CLASS_NST_METHODS(CLASS) (TYPE_MINVAL (CLASS)) -#define CLASS_CLS_METHODS(CLASS) (TYPE_MAXVAL (CLASS)) +#define CLASS_NST_METHODS(CLASS) (TYPE_MIN_VALUE_RAW (CLASS)) +#define CLASS_CLS_METHODS(CLASS) (TYPE_MAX_VALUE_RAW (CLASS)) #define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 2) #define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 3) #define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 4) @@ -189,8 +189,8 @@ enum objc_property_assign_semantics { #define PROTOCOL_NAME(CLASS) (TYPE_NAME (CLASS)) #define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0) -#define PROTOCOL_NST_METHODS(CLASS) (TYPE_MINVAL (CLASS)) -#define PROTOCOL_CLS_METHODS(CLASS) (TYPE_MAXVAL (CLASS)) +#define PROTOCOL_NST_METHODS(CLASS) (TYPE_MIN_VALUE_RAW (CLASS)) +#define PROTOCOL_CLS_METHODS(CLASS) (TYPE_MAX_VALUE_RAW (CLASS)) #define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1) #define PROTOCOL_DEFINED(CLASS) TREE_USED (CLASS) #define PROTOCOL_OPTIONAL_CLS_METHODS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 2) diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 7f7ea7f90ab..d7b6d224ab5 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -821,8 +821,8 @@ lto_input_ts_type_non_common_tree_pointers (struct lto_input_block *ib, TYPE_ARG_TYPES (expr) = stream_read_tree (ib, data_in); if (!POINTER_TYPE_P (expr)) - TYPE_MINVAL (expr) = stream_read_tree (ib, data_in); - TYPE_MAXVAL (expr) = stream_read_tree (ib, data_in); + TYPE_MIN_VALUE_RAW (expr) = stream_read_tree (ib, data_in); + TYPE_MAX_VALUE_RAW (expr) = stream_read_tree (ib, data_in); if (RECORD_OR_UNION_TYPE_P (expr)) TYPE_BINFO (expr) = stream_read_tree (ib, data_in); } diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index 05239fb7c25..ec47a9b8040 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -704,8 +704,8 @@ write_ts_type_non_common_tree_pointers (struct output_block *ob, tree expr, stream_write_tree (ob, TYPE_ARG_TYPES (expr), ref_p); if (!POINTER_TYPE_P (expr)) - stream_write_tree (ob, TYPE_MINVAL (expr), ref_p); - stream_write_tree (ob, TYPE_MAXVAL (expr), ref_p); + stream_write_tree (ob, TYPE_MIN_VALUE_RAW (expr), ref_p); + stream_write_tree (ob, TYPE_MAX_VALUE_RAW (expr), ref_p); if (RECORD_OR_UNION_TYPE_P (expr)) stream_write_tree (ob, TYPE_BINFO (expr), ref_p); } diff --git a/gcc/tree.c b/gcc/tree.c index 678b2708910..70da8d2ee2d 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5633,9 +5633,9 @@ find_decls_types_r (tree *tp, int *ws, void *data) them and thus do not and want not to reach unused pointer types this way. */ if (!POINTER_TYPE_P (t)) - fld_worklist_push (TYPE_MINVAL (t), fld); + fld_worklist_push (TYPE_MIN_VALUE_RAW (t), fld); if (!RECORD_OR_UNION_TYPE_P (t)) - fld_worklist_push (TYPE_MAXVAL (t), fld); + fld_worklist_push (TYPE_MAX_VALUE_RAW (t), fld); fld_worklist_push (TYPE_MAIN_VARIANT (t), fld); /* Do not walk TYPE_NEXT_VARIANT. We do not stream it and thus do not and want not to reach unused variants this way. */ @@ -13974,7 +13974,7 @@ verify_type (const_tree t) } - /* Check various uses of TYPE_MINVAL. */ + /* Check various uses of TYPE_MIN_VALUE_RAW. */ if (RECORD_OR_UNION_TYPE_P (t)) { /* FIXME: C FE uses TYPE_VFIELD to record C_TYPE_INCOMPLETE_VARS @@ -14069,10 +14069,10 @@ verify_type (const_tree t) error_found = true; } } - else if (TYPE_MAXVAL (t)) + else if (TYPE_MAX_VALUE_RAW (t)) { - error ("TYPE_MAXVAL non-NULL"); - debug_tree (TYPE_MAXVAL (t)); + error ("TYPE_MAX_VALUE_RAW non-NULL"); + debug_tree (TYPE_MAX_VALUE_RAW (t)); error_found = true; } diff --git a/gcc/tree.h b/gcc/tree.h index 91cf253dee5..6ab42244df5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2103,37 +2103,37 @@ extern machine_mode element_mode (const_tree t); #define TYPE_VALUES(NODE) (ENUMERAL_TYPE_CHECK (NODE)->type_non_common.values) #define TYPE_DOMAIN(NODE) (ARRAY_TYPE_CHECK (NODE)->type_non_common.values) -#define TYPE_FIELDS(NODE) \ +#define TYPE_FIELDS(NODE) \ (RECORD_OR_UNION_CHECK (NODE)->type_non_common.values) #define TYPE_CACHED_VALUES(NODE) (TYPE_CHECK (NODE)->type_non_common.values) -#define TYPE_ARG_TYPES(NODE) \ +#define TYPE_ARG_TYPES(NODE) \ (FUNC_OR_METHOD_CHECK (NODE)->type_non_common.values) #define TYPE_VALUES_RAW(NODE) (TYPE_CHECK (NODE)->type_non_common.values) -#define TYPE_METHODS(NODE) \ - (RECORD_OR_UNION_CHECK (NODE)->type_non_common.maxval) -#define TYPE_VFIELD(NODE) \ - (RECORD_OR_UNION_CHECK (NODE)->type_non_common.minval) -#define TYPE_METHOD_BASETYPE(NODE) \ - (FUNC_OR_METHOD_CHECK (NODE)->type_non_common.maxval) -#define TYPE_OFFSET_BASETYPE(NODE) \ - (OFFSET_TYPE_CHECK (NODE)->type_non_common.maxval) -#define TYPE_MAXVAL(NODE) (TYPE_CHECK (NODE)->type_non_common.maxval) -#define TYPE_MINVAL(NODE) (TYPE_CHECK (NODE)->type_non_common.minval) -#define TYPE_NEXT_PTR_TO(NODE) \ +#define TYPE_MIN_VALUE(NODE) \ + (NUMERICAL_TYPE_CHECK (NODE)->type_non_common.minval) +#define TYPE_NEXT_PTR_TO(NODE) \ (POINTER_TYPE_CHECK (NODE)->type_non_common.minval) -#define TYPE_NEXT_REF_TO(NODE) \ +#define TYPE_NEXT_REF_TO(NODE) \ (REFERENCE_TYPE_CHECK (NODE)->type_non_common.minval) -#define TYPE_MIN_VALUE(NODE) \ - (NUMERICAL_TYPE_CHECK (NODE)->type_non_common.minval) +#define TYPE_VFIELD(NODE) \ + (RECORD_OR_UNION_CHECK (NODE)->type_non_common.minval) +#define TYPE_MIN_VALUE_RAW(NODE) (TYPE_CHECK (NODE)->type_non_common.minval) + #define TYPE_MAX_VALUE(NODE) \ (NUMERICAL_TYPE_CHECK (NODE)->type_non_common.maxval) - +#define TYPE_METHODS(NODE) \ + (RECORD_OR_UNION_CHECK (NODE)->type_non_common.maxval) +#define TYPE_METHOD_BASETYPE(NODE) \ + (FUNC_OR_METHOD_CHECK (NODE)->type_non_common.maxval) +#define TYPE_OFFSET_BASETYPE(NODE) \ + (OFFSET_TYPE_CHECK (NODE)->type_non_common.maxval) /* If non-NULL, this is an upper bound of the size (in bytes) of an object of the given ARRAY_TYPE_NON_COMMON. This allows temporaries to be allocated. */ #define TYPE_ARRAY_MAX_SIZE(ARRAY_TYPE) \ (ARRAY_TYPE_CHECK (ARRAY_TYPE)->type_non_common.maxval) +#define TYPE_MAX_VALUE_RAW(NODE) (TYPE_CHECK (NODE)->type_non_common.maxval) /* For record and union types, information about this type, as a base type for itself. */