+2017-07-19 Nathan Sidwell <nathan@acm.org>
+
+ * 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 <tom@codesourcery.com>
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 <ubizjak@gmail.com>
+2017-07-19 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS,
+ PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW.
+
2017-07-18 Nathan Sidwell <nathan@acm.org>
* cp-array-notation.c (build_array_notation_ref): Use
#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. */
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));
}
|| 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));
}
+2017-07-19 Nathan Sidwell <nathan@acm.org>
+
+ * 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 <hubicka@ucw.cz>
* lto-partition.c (lto_balanced_map): Do not check
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);
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))
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));
+2017-07-19 Nathan Sidwell <nathan@acm.org>
+
+ * objc-act.h (CLASS_NST_METHODS, CLASS_CLS_METHODS): Use
+ TYPE_{MIN,MAX}_VALUE_RAW.
+
2017-05-16 Sylvestre Ledru <sylvestre@debian.org>
* objc-runtime-shared-support.c (build_module_descriptor):
#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)
#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)
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);
}
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);
}
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. */
}
- /* 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
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;
}
#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. */