From 8e966116ccd5aef7a3965e4375e9ed2384357303 Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 21 Mar 2013 11:53:39 +0000 Subject: 2013-03-21 Richard Biener * tree.h (DECL_DEBUG_EXPR_IS_FROM): Rename to ... (DECL_HAS_DEBUG_EXPR_P): ... this. Guard properly. * tree.c (copy_node_stat): Do not copy DECL_HAS_DEBUG_EXPR_P. * dwarf2out.c (add_var_loc_to_decl): Use DECL_HAS_DEBUG_EXPR_P instead of DECL_DEBUG_EXPR_IS_FROM. * gimplify.c (gimplify_modify_expr): Likewise. * tree-cfg.c (verify_expr_location_1): Likewise. * tree-complex.c (create_one_component_var): Likewise. * tree-sra.c (create_access_replacement): Likewise. * tree-ssa-live.c (clear_unused_block_pointer_1): Likewise. (clear_unused_block_pointer): Likewise. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Likewise. * tree-streamer-out.c (pack_ts_decl_common_value_fields): Likewise. * var-tracking.c (var_debug_decl): Likewise. (track_expr_p): Likewise. * tree-inline.c (add_local_variables): Likewise. Set DECL_HAS_DEBUG_EXPR_P after copying it. * tree-diagnostic.c (default_tree_printer): Use DECL_HAS_DEBUG_EXPR_P instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly. c/ * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly. cp/ * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196864 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index b852f1d9434..9aae8df17bc 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2709,8 +2709,6 @@ struct GTY(()) tree_decl_minimal { checked before any access to the former. */ #define DECL_FUNCTION_CODE(NODE) \ (FUNCTION_DECL_CHECK (NODE)->function_decl.function_code) -#define DECL_DEBUG_EXPR_IS_FROM(NODE) \ - (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from) #define DECL_FUNCTION_PERSONALITY(NODE) \ (FUNCTION_DECL_CHECK (NODE)->function_decl.personality) @@ -3223,9 +3221,9 @@ struct GTY(()) tree_decl_with_vis { extern tree decl_debug_expr_lookup (tree); extern void decl_debug_expr_insert (tree, tree); -/* For VAR_DECL, this is set to either an expression that it was split - from (if DECL_DEBUG_EXPR_IS_FROM is true), otherwise a tree_list of - subexpressions that it was split into. */ +/* For VAR_DECL, this is set to an expression that it was split from. */ +#define DECL_HAS_DEBUG_EXPR_P(NODE) \ + (VAR_DECL_CHECK (NODE)->decl_common.debug_expr_is_from) #define DECL_DEBUG_EXPR(NODE) \ (decl_debug_expr_lookup (VAR_DECL_CHECK (NODE))) -- cgit v1.2.1 From 8ee286c80c4d6cb190299e8bf861e3db3c44642f Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 21 Mar 2013 16:33:33 +0000 Subject: 2013-03-21 Marc Glisse gcc/ * tree.h (VECTOR_TYPE_P): New macro. (VECTOR_INTEGER_TYPE_P, VECTOR_FLOAT_TYPE_P, FLOAT_TYPE_P, TYPE_MODE): Use it. * fold-const.c (fold_cond_expr_with_comparison): Use build_zero_cst. VEC_COND_EXPR cannot be lvalues. (fold_ternary_loc) : Merge with the COND_EXPR case. gcc/cp/ * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR. gcc/testsuite/ * g++.dg/ext/vector21.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196884 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 9aae8df17bc..f1b988ca7bb 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -981,6 +981,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, #define STRIP_USELESS_TYPE_CONVERSION(EXP) \ (EXP) = tree_ssa_strip_useless_type_conversions (EXP) +/* Nonzero if TYPE represents a vector type. */ + +#define VECTOR_TYPE_P(TYPE) (TREE_CODE (TYPE) == VECTOR_TYPE) + /* Nonzero if TYPE represents an integral type. Note that we do not include COMPLEX types here. Keep these checks in ascending code order. */ @@ -1016,15 +1020,15 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, /* Nonzero if TYPE represents a vector integer type. */ -#define VECTOR_INTEGER_TYPE_P(TYPE) \ - (TREE_CODE (TYPE) == VECTOR_TYPE \ - && TREE_CODE (TREE_TYPE (TYPE)) == INTEGER_TYPE) +#define VECTOR_INTEGER_TYPE_P(TYPE) \ + (VECTOR_TYPE_P (TYPE) \ + && TREE_CODE (TREE_TYPE (TYPE)) == INTEGER_TYPE) /* Nonzero if TYPE represents a vector floating-point type. */ #define VECTOR_FLOAT_TYPE_P(TYPE) \ - (TREE_CODE (TYPE) == VECTOR_TYPE \ + (VECTOR_TYPE_P (TYPE) \ && TREE_CODE (TREE_TYPE (TYPE)) == REAL_TYPE) /* Nonzero if TYPE represents a floating-point type, including complex @@ -1034,7 +1038,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, #define FLOAT_TYPE_P(TYPE) \ (SCALAR_FLOAT_TYPE_P (TYPE) \ || ((TREE_CODE (TYPE) == COMPLEX_TYPE \ - || TREE_CODE (TYPE) == VECTOR_TYPE) \ + || VECTOR_TYPE_P (TYPE)) \ && SCALAR_FLOAT_TYPE_P (TREE_TYPE (TYPE)))) /* Nonzero if TYPE represents a decimal floating-point type. */ @@ -2116,7 +2120,7 @@ struct GTY(()) tree_block { /* Vector types need to check target flags to determine type. */ extern enum machine_mode vector_type_mode (const_tree); #define TYPE_MODE(NODE) \ - (TREE_CODE (TYPE_CHECK (NODE)) == VECTOR_TYPE \ + (VECTOR_TYPE_P (TYPE_CHECK (NODE)) \ ? vector_type_mode (NODE) : (NODE)->type_common.mode) #define SET_TYPE_MODE(NODE, MODE) \ (TYPE_CHECK (NODE)->type_common.mode = (MODE)) -- cgit v1.2.1