comparison gcc/tree.h @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents e234ee7b7292 84e7813d76e9
children 351920fa3827
comparison
equal deleted inserted replaced
130:e108057fa461 132:d34655255c78
1 /* Definitions for the ubiquitous 'tree' type for GNU compilers. 1 /* Definitions for the ubiquitous 'tree' type for GNU compilers.
2 Copyright (C) 1989-2017 Free Software Foundation, Inc. 2 Copyright (C) 1989-2018 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
481 tree_ssa_useless_type_conversion. */ 481 tree_ssa_useless_type_conversion. */
482 482
483 #define STRIP_USELESS_TYPE_CONVERSION(EXP) \ 483 #define STRIP_USELESS_TYPE_CONVERSION(EXP) \
484 (EXP) = tree_ssa_strip_useless_type_conversions (EXP) 484 (EXP) = tree_ssa_strip_useless_type_conversions (EXP)
485 485
486 /* Remove any VIEW_CONVERT_EXPR or NON_LVALUE_EXPR that's purely
487 in use to provide a location_t. */
488
489 #define STRIP_ANY_LOCATION_WRAPPER(EXP) \
490 (EXP) = tree_strip_any_location_wrapper (CONST_CAST_TREE (EXP))
491
486 /* Nonzero if TYPE represents a vector type. */ 492 /* Nonzero if TYPE represents a vector type. */
487 493
488 #define VECTOR_TYPE_P(TYPE) (TREE_CODE (TYPE) == VECTOR_TYPE) 494 #define VECTOR_TYPE_P(TYPE) (TREE_CODE (TYPE) == VECTOR_TYPE)
489 495
490 /* Nonzero if TYPE represents a vector of booleans. */ 496 /* Nonzero if TYPE represents a vector of booleans. */
586 #define FUNCTION_POINTER_TYPE_P(TYPE) \ 592 #define FUNCTION_POINTER_TYPE_P(TYPE) \
587 (POINTER_TYPE_P (TYPE) && TREE_CODE (TREE_TYPE (TYPE)) == FUNCTION_TYPE) 593 (POINTER_TYPE_P (TYPE) && TREE_CODE (TREE_TYPE (TYPE)) == FUNCTION_TYPE)
588 594
589 /* Nonzero if this type is a complete type. */ 595 /* Nonzero if this type is a complete type. */
590 #define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE) 596 #define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE)
591
592 /* Nonzero if this type is a pointer bounds type. */
593 #define POINTER_BOUNDS_TYPE_P(NODE) \
594 (TREE_CODE (NODE) == POINTER_BOUNDS_TYPE)
595
596 /* Nonzero if this node has a pointer bounds type. */
597 #define POINTER_BOUNDS_P(NODE) \
598 (POINTER_BOUNDS_TYPE_P (TREE_TYPE (NODE)))
599
600 /* Nonzero if this type supposes bounds existence. */
601 #define BOUNDED_TYPE_P(type) (POINTER_TYPE_P (type))
602
603 /* Nonzero for objects with bounded type. */
604 #define BOUNDED_P(node) \
605 BOUNDED_TYPE_P (TREE_TYPE (node))
606 597
607 /* Nonzero if this type is the (possibly qualified) void type. */ 598 /* Nonzero if this type is the (possibly qualified) void type. */
608 #define VOID_TYPE_P(NODE) (TREE_CODE (NODE) == VOID_TYPE) 599 #define VOID_TYPE_P(NODE) (TREE_CODE (NODE) == VOID_TYPE)
609 600
610 /* Nonzero if this type is complete or is cv void. */ 601 /* Nonzero if this type is complete or is cv void. */
694 warnings concerning the decl should be suppressed. This is used at 685 warnings concerning the decl should be suppressed. This is used at
695 least for used-before-set warnings, and it set after one warning is 686 least for used-before-set warnings, and it set after one warning is
696 emitted. */ 687 emitted. */
697 #define TREE_NO_WARNING(NODE) ((NODE)->base.nowarning_flag) 688 #define TREE_NO_WARNING(NODE) ((NODE)->base.nowarning_flag)
698 689
690 /* Nonzero if we should warn about the change in empty class parameter
691 passing ABI in this TU. */
692 #define TRANSLATION_UNIT_WARN_EMPTY_P(NODE) \
693 (TRANSLATION_UNIT_DECL_CHECK (NODE)->decl_common.decl_flag_0)
694
695 /* Nonzero if this type is "empty" according to the particular psABI. */
696 #define TYPE_EMPTY_P(NODE) (TYPE_CHECK (NODE)->type_common.empty_flag)
697
699 /* Used to indicate that this TYPE represents a compiler-generated entity. */ 698 /* Used to indicate that this TYPE represents a compiler-generated entity. */
700 #define TYPE_ARTIFICIAL(NODE) (TYPE_CHECK (NODE)->base.nowarning_flag) 699 #define TYPE_ARTIFICIAL(NODE) (TYPE_CHECK (NODE)->base.nowarning_flag)
701 700
702 /* In an IDENTIFIER_NODE, this means that assemble_name was called with 701 /* In an IDENTIFIER_NODE, this means that assemble_name was called with
703 this string as an argument. */ 702 this string as an argument. */
756 /* Whether a case or a user-defined label is allowed to fall through to. 755 /* Whether a case or a user-defined label is allowed to fall through to.
757 This is used to implement -Wimplicit-fallthrough. */ 756 This is used to implement -Wimplicit-fallthrough. */
758 #define FALLTHROUGH_LABEL_P(NODE) \ 757 #define FALLTHROUGH_LABEL_P(NODE) \
759 (LABEL_DECL_CHECK (NODE)->base.private_flag) 758 (LABEL_DECL_CHECK (NODE)->base.private_flag)
760 759
760 /* Set on the artificial label created for break; stmt from a switch.
761 This is used to implement -Wimplicit-fallthrough. */
762 #define SWITCH_BREAK_LABEL_P(NODE) \
763 (LABEL_DECL_CHECK (NODE)->base.protected_flag)
764
761 /* Nonzero means this expression is volatile in the C sense: 765 /* Nonzero means this expression is volatile in the C sense:
762 its address should be of type `volatile WHATEVER *'. 766 its address should be of type `volatile WHATEVER *'.
763 In other words, the declared item is volatile qualified. 767 In other words, the declared item is volatile qualified.
764 This is used in _DECL nodes and _REF nodes. 768 This is used in _DECL nodes and _REF nodes.
765 On a FUNCTION_DECL node, this means the function does not 769 On a FUNCTION_DECL node, this means the function does not
808 #define TYPE_UNSIGNED(NODE) (TYPE_CHECK (NODE)->base.u.bits.unsigned_flag) 812 #define TYPE_UNSIGNED(NODE) (TYPE_CHECK (NODE)->base.u.bits.unsigned_flag)
809 813
810 /* Same as TYPE_UNSIGNED but converted to SIGNOP. */ 814 /* Same as TYPE_UNSIGNED but converted to SIGNOP. */
811 #define TYPE_SIGN(NODE) ((signop) TYPE_UNSIGNED (NODE)) 815 #define TYPE_SIGN(NODE) ((signop) TYPE_UNSIGNED (NODE))
812 816
813 /* True if overflow wraps around for the given integral type. That 817 /* True if overflow wraps around for the given integral or pointer type. That
814 is, TYPE_MAX + 1 == TYPE_MIN. */ 818 is, TYPE_MAX + 1 == TYPE_MIN. */
815 #define TYPE_OVERFLOW_WRAPS(TYPE) \ 819 #define TYPE_OVERFLOW_WRAPS(TYPE) \
816 (ANY_INTEGRAL_TYPE_CHECK(TYPE)->base.u.bits.unsigned_flag || flag_wrapv) 820 (POINTER_TYPE_P (TYPE) \
817 821 ? flag_wrapv_pointer \
818 /* True if overflow is undefined for the given integral type. We may 822 : (ANY_INTEGRAL_TYPE_CHECK(TYPE)->base.u.bits.unsigned_flag \
819 optimize on the assumption that values in the type never overflow. 823 || flag_wrapv))
824
825 /* True if overflow is undefined for the given integral or pointer type.
826 We may optimize on the assumption that values in the type never overflow.
820 827
821 IMPORTANT NOTE: Any optimization based on TYPE_OVERFLOW_UNDEFINED 828 IMPORTANT NOTE: Any optimization based on TYPE_OVERFLOW_UNDEFINED
822 must issue a warning based on warn_strict_overflow. In some cases 829 must issue a warning based on warn_strict_overflow. In some cases
823 it will be appropriate to issue the warning immediately, and in 830 it will be appropriate to issue the warning immediately, and in
824 other cases it will be appropriate to simply set a flag and let the 831 other cases it will be appropriate to simply set a flag and let the
825 caller decide whether a warning is appropriate or not. */ 832 caller decide whether a warning is appropriate or not. */
826 #define TYPE_OVERFLOW_UNDEFINED(TYPE) \ 833 #define TYPE_OVERFLOW_UNDEFINED(TYPE) \
827 (!ANY_INTEGRAL_TYPE_CHECK(TYPE)->base.u.bits.unsigned_flag \ 834 (POINTER_TYPE_P (TYPE) \
828 && !flag_wrapv && !flag_trapv) 835 ? !flag_wrapv_pointer \
836 : (!ANY_INTEGRAL_TYPE_CHECK(TYPE)->base.u.bits.unsigned_flag \
837 && !flag_wrapv && !flag_trapv))
829 838
830 /* True if overflow for the given integral type should issue a 839 /* True if overflow for the given integral type should issue a
831 trap. */ 840 trap. */
832 #define TYPE_OVERFLOW_TRAPS(TYPE) \ 841 #define TYPE_OVERFLOW_TRAPS(TYPE) \
833 (!ANY_INTEGRAL_TYPE_CHECK(TYPE)->base.u.bits.unsigned_flag && flag_trapv) 842 (!ANY_INTEGRAL_TYPE_CHECK(TYPE)->base.u.bits.unsigned_flag && flag_trapv)
865 /* In a CALL_EXPR, means that it's safe to use the target of the call 874 /* In a CALL_EXPR, means that it's safe to use the target of the call
866 expansion as the return slot for a call that returns in memory. */ 875 expansion as the return slot for a call that returns in memory. */
867 #define CALL_EXPR_RETURN_SLOT_OPT(NODE) \ 876 #define CALL_EXPR_RETURN_SLOT_OPT(NODE) \
868 (CALL_EXPR_CHECK (NODE)->base.private_flag) 877 (CALL_EXPR_CHECK (NODE)->base.private_flag)
869 878
870 /* Cilk keywords accessors. */
871 #define CILK_SPAWN_FN(NODE) TREE_OPERAND (CILK_SPAWN_STMT_CHECK (NODE), 0)
872
873 /* If this is true, we should insert a __cilk_detach call just before
874 this function call. */
875 #define EXPR_CILK_SPAWN(NODE) \
876 (TREE_CHECK2 (NODE, CALL_EXPR, \
877 AGGR_INIT_EXPR)->base.u.bits.unsigned_flag)
878
879 /* In a RESULT_DECL, PARM_DECL and VAR_DECL, means that it is 879 /* In a RESULT_DECL, PARM_DECL and VAR_DECL, means that it is
880 passed by invisible reference (and the TREE_TYPE is a pointer to the true 880 passed by invisible reference (and the TREE_TYPE is a pointer to the true
881 type). */ 881 type). */
882 #define DECL_BY_REFERENCE(NODE) \ 882 #define DECL_BY_REFERENCE(NODE) \
883 (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \ 883 (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \
900 900
901 /* In a CALL_EXPR, if the function being called is BUILT_IN_ALLOCA, means that 901 /* In a CALL_EXPR, if the function being called is BUILT_IN_ALLOCA, means that
902 it has been built for the declaration of a variable-sized object. */ 902 it has been built for the declaration of a variable-sized object. */
903 #define CALL_ALLOCA_FOR_VAR_P(NODE) \ 903 #define CALL_ALLOCA_FOR_VAR_P(NODE) \
904 (CALL_EXPR_CHECK (NODE)->base.protected_flag) 904 (CALL_EXPR_CHECK (NODE)->base.protected_flag)
905
906 /* In a CALL_EXPR, means call was instrumented by Pointer Bounds Checker. */
907 #define CALL_WITH_BOUNDS_P(NODE) (CALL_EXPR_CHECK (NODE)->base.deprecated_flag)
908 905
909 /* Used in classes in C++. */ 906 /* Used in classes in C++. */
910 #define TREE_PRIVATE(NODE) ((NODE)->base.private_flag) 907 #define TREE_PRIVATE(NODE) ((NODE)->base.private_flag)
911 /* Used in classes in C++. */ 908 /* Used in classes in C++. */
912 #define TREE_PROTECTED(NODE) ((NODE)->base.protected_flag) 909 #define TREE_PROTECTED(NODE) ((NODE)->base.protected_flag)
985 (INTEGER_CST_CHECK (NODE)->base.u.int_length.offset) 982 (INTEGER_CST_CHECK (NODE)->base.u.int_length.offset)
986 #define TREE_INT_CST_ELT(NODE, I) TREE_INT_CST_ELT_CHECK (NODE, I) 983 #define TREE_INT_CST_ELT(NODE, I) TREE_INT_CST_ELT_CHECK (NODE, I)
987 #define TREE_INT_CST_LOW(NODE) \ 984 #define TREE_INT_CST_LOW(NODE) \
988 ((unsigned HOST_WIDE_INT) TREE_INT_CST_ELT (NODE, 0)) 985 ((unsigned HOST_WIDE_INT) TREE_INT_CST_ELT (NODE, 0))
989 986
987 /* Return true if NODE is a POLY_INT_CST. This is only ever true on
988 targets with variable-sized modes. */
989 #define POLY_INT_CST_P(NODE) \
990 (NUM_POLY_INT_COEFFS > 1 && TREE_CODE (NODE) == POLY_INT_CST)
991
992 /* In a POLY_INT_CST node. */
993 #define POLY_INT_CST_COEFF(NODE, I) \
994 (POLY_INT_CST_CHECK (NODE)->poly_int_cst.coeffs[I])
995
990 #define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr) 996 #define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr)
991 #define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE)) 997 #define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE))
992 998
993 #define TREE_FIXED_CST_PTR(NODE) \ 999 #define TREE_FIXED_CST_PTR(NODE) \
994 (FIXED_CST_CHECK (NODE)->fixed_cst.fixed_cst_ptr) 1000 (FIXED_CST_CHECK (NODE)->fixed_cst.fixed_cst_ptr)
1002 1008
1003 /* In a COMPLEX_CST node. */ 1009 /* In a COMPLEX_CST node. */
1004 #define TREE_REALPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.real) 1010 #define TREE_REALPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.real)
1005 #define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag) 1011 #define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag)
1006 1012
1007 /* In a VECTOR_CST node. */ 1013 /* In a VECTOR_CST node. See generic.texi for details. */
1008 #define VECTOR_CST_NELTS(NODE) (VECTOR_CST_CHECK (NODE)->base.u.nelts) 1014 #define VECTOR_CST_NELTS(NODE) (TYPE_VECTOR_SUBPARTS (TREE_TYPE (NODE)))
1009 #define VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elts) 1015 #define VECTOR_CST_ELT(NODE,IDX) vector_cst_elt (NODE, IDX)
1010 #define VECTOR_CST_ELT(NODE,IDX) (VECTOR_CST_CHECK (NODE)->vector.elts[IDX]) 1016
1017 #define VECTOR_CST_LOG2_NPATTERNS(NODE) \
1018 (VECTOR_CST_CHECK (NODE)->base.u.vector_cst.log2_npatterns)
1019 #define VECTOR_CST_NPATTERNS(NODE) \
1020 (1U << VECTOR_CST_LOG2_NPATTERNS (NODE))
1021 #define VECTOR_CST_NELTS_PER_PATTERN(NODE) \
1022 (VECTOR_CST_CHECK (NODE)->base.u.vector_cst.nelts_per_pattern)
1023 #define VECTOR_CST_DUPLICATE_P(NODE) \
1024 (VECTOR_CST_NELTS_PER_PATTERN (NODE) == 1)
1025 #define VECTOR_CST_STEPPED_P(NODE) \
1026 (VECTOR_CST_NELTS_PER_PATTERN (NODE) == 3)
1027 #define VECTOR_CST_ENCODED_ELTS(NODE) \
1028 (VECTOR_CST_CHECK (NODE)->vector.elts)
1029 #define VECTOR_CST_ENCODED_ELT(NODE, ELT) \
1030 (VECTOR_CST_CHECK (NODE)->vector.elts[ELT])
1011 1031
1012 /* Define fields and accessors for some special-purpose tree nodes. */ 1032 /* Define fields and accessors for some special-purpose tree nodes. */
1013 1033
1014 #define IDENTIFIER_LENGTH(NODE) \ 1034 #define IDENTIFIER_LENGTH(NODE) \
1015 (IDENTIFIER_NODE_CHECK (NODE)->identifier.id.len) 1035 (IDENTIFIER_NODE_CHECK (NODE)->identifier.id.len)
1103 Note that we have to bypass the use of TREE_OPERAND to access 1123 Note that we have to bypass the use of TREE_OPERAND to access
1104 that field to avoid infinite recursion in expanding the macros. */ 1124 that field to avoid infinite recursion in expanding the macros. */
1105 #define VL_EXP_OPERAND_LENGTH(NODE) \ 1125 #define VL_EXP_OPERAND_LENGTH(NODE) \
1106 ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0])) 1126 ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0]))
1107 1127
1128 /* Nonzero if gimple_debug_nonbind_marker_p() may possibly hold. */
1129 #define MAY_HAVE_DEBUG_MARKER_STMTS debug_nonbind_markers_p
1130 /* Nonzero if gimple_debug_bind_p() (and thus
1131 gimple_debug_source_bind_p()) may possibly hold. */
1132 #define MAY_HAVE_DEBUG_BIND_STMTS flag_var_tracking_assignments
1108 /* Nonzero if is_gimple_debug() may possibly hold. */ 1133 /* Nonzero if is_gimple_debug() may possibly hold. */
1109 #define MAY_HAVE_DEBUG_STMTS (flag_var_tracking_assignments) 1134 #define MAY_HAVE_DEBUG_STMTS \
1135 (MAY_HAVE_DEBUG_MARKER_STMTS || MAY_HAVE_DEBUG_BIND_STMTS)
1110 1136
1111 /* In a LOOP_EXPR node. */ 1137 /* In a LOOP_EXPR node. */
1112 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0) 1138 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0)
1113 1139
1114 /* The source location of this expression. Non-tree_exp nodes such as 1140 /* The source location of this expression. Non-tree_exp nodes such as
1145 return get_range_from_loc (line_table, loc); 1171 return get_range_from_loc (line_table, loc);
1146 } 1172 }
1147 1173
1148 extern void protected_set_expr_location (tree, location_t); 1174 extern void protected_set_expr_location (tree, location_t);
1149 1175
1176 extern tree maybe_wrap_with_location (tree, location_t);
1177
1150 /* In a TARGET_EXPR node. */ 1178 /* In a TARGET_EXPR node. */
1151 #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0) 1179 #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0)
1152 #define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 1) 1180 #define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 1)
1153 #define TARGET_EXPR_CLEANUP(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 2) 1181 #define TARGET_EXPR_CLEANUP(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 2)
1182 /* Don't elide the initialization of TARGET_EXPR_SLOT for this TARGET_EXPR
1183 on rhs of MODIFY_EXPR. */
1184 #define TARGET_EXPR_NO_ELIDE(NODE) (TARGET_EXPR_CHECK (NODE)->base.private_flag)
1154 1185
1155 /* DECL_EXPR accessor. This gives access to the DECL associated with 1186 /* DECL_EXPR accessor. This gives access to the DECL associated with
1156 the given declaration statement. */ 1187 the given declaration statement. */
1157 #define DECL_EXPR_DECL(NODE) TREE_OPERAND (DECL_EXPR_CHECK (NODE), 0) 1188 #define DECL_EXPR_DECL(NODE) TREE_OPERAND (DECL_EXPR_CHECK (NODE), 0)
1158 1189
1162 #define COMPOUND_LITERAL_EXPR_DECL_EXPR(NODE) \ 1193 #define COMPOUND_LITERAL_EXPR_DECL_EXPR(NODE) \
1163 TREE_OPERAND (COMPOUND_LITERAL_EXPR_CHECK (NODE), 0) 1194 TREE_OPERAND (COMPOUND_LITERAL_EXPR_CHECK (NODE), 0)
1164 #define COMPOUND_LITERAL_EXPR_DECL(NODE) \ 1195 #define COMPOUND_LITERAL_EXPR_DECL(NODE) \
1165 DECL_EXPR_DECL (COMPOUND_LITERAL_EXPR_DECL_EXPR (NODE)) 1196 DECL_EXPR_DECL (COMPOUND_LITERAL_EXPR_DECL_EXPR (NODE))
1166 1197
1167 /* SWITCH_EXPR accessors. These give access to the condition, body and 1198 /* SWITCH_EXPR accessors. These give access to the condition and body. */
1168 original condition type (before any compiler conversions)
1169 of the switch statement, respectively. */
1170 #define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 0) 1199 #define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 0)
1171 #define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 1) 1200 #define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 1)
1172 #define SWITCH_LABELS(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 2) 1201 /* True if there are case labels for all possible values of SWITCH_COND, either
1202 because there is a default: case label or because the case label ranges cover
1203 all values. */
1204 #define SWITCH_ALL_CASES_P(NODE) (SWITCH_EXPR_CHECK (NODE)->base.private_flag)
1173 1205
1174 /* CASE_LABEL_EXPR accessors. These give access to the high and low values 1206 /* CASE_LABEL_EXPR accessors. These give access to the high and low values
1175 of a case label, respectively. */ 1207 of a case label, respectively. */
1176 #define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 0) 1208 #define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 0)
1177 #define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 1) 1209 #define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 1)
1196 #define BIND_EXPR_BODY(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 1)) 1228 #define BIND_EXPR_BODY(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 1))
1197 #define BIND_EXPR_BLOCK(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 2)) 1229 #define BIND_EXPR_BLOCK(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 2))
1198 1230
1199 /* GOTO_EXPR accessor. This gives access to the label associated with 1231 /* GOTO_EXPR accessor. This gives access to the label associated with
1200 a goto statement. */ 1232 a goto statement. */
1201 #define GOTO_DESTINATION(NODE) TREE_OPERAND ((NODE), 0) 1233 #define GOTO_DESTINATION(NODE) TREE_OPERAND (GOTO_EXPR_CHECK (NODE), 0)
1202 1234
1203 /* ASM_EXPR accessors. ASM_STRING returns a STRING_CST for the 1235 /* ASM_EXPR accessors. ASM_STRING returns a STRING_CST for the
1204 instruction (e.g., "mov x, y"). ASM_OUTPUTS, ASM_INPUTS, and 1236 instruction (e.g., "mov x, y"). ASM_OUTPUTS, ASM_INPUTS, and
1205 ASM_CLOBBERS represent the outputs, inputs, and clobbers for the 1237 ASM_CLOBBERS represent the outputs, inputs, and clobbers for the
1206 statement. */ 1238 statement. */
1709 Default definitions are always created by an empty statement and 1741 Default definitions are always created by an empty statement and
1710 belong to no basic block. */ 1742 belong to no basic block. */
1711 #define SSA_NAME_IS_DEFAULT_DEF(NODE) \ 1743 #define SSA_NAME_IS_DEFAULT_DEF(NODE) \
1712 SSA_NAME_CHECK (NODE)->base.default_def_flag 1744 SSA_NAME_CHECK (NODE)->base.default_def_flag
1713 1745
1746 /* Nonzero if this SSA_NAME is known to point to memory that may not
1747 be written to. This is set for default defs of function parameters
1748 that have a corresponding r or R specification in the functions
1749 fn spec attribute. This is used by alias analysis. */
1750 #define SSA_NAME_POINTS_TO_READONLY_MEMORY(NODE) \
1751 SSA_NAME_CHECK (NODE)->base.deprecated_flag
1752
1714 /* Attributes for SSA_NAMEs for pointer-type variables. */ 1753 /* Attributes for SSA_NAMEs for pointer-type variables. */
1715 #define SSA_NAME_PTR_INFO(N) \ 1754 #define SSA_NAME_PTR_INFO(N) \
1716 SSA_NAME_CHECK (N)->ssa_name.info.ptr_info 1755 SSA_NAME_CHECK (N)->ssa_name.info.ptr_info
1717 1756
1718 /* True if SSA_NAME_RANGE_INFO describes an anti-range. */ 1757 /* True if SSA_NAME_RANGE_INFO describes an anti-range. */
1748 #define BLOCK_NONLOCALIZED_VAR(NODE,N) (*BLOCK_NONLOCALIZED_VARS (NODE))[N] 1787 #define BLOCK_NONLOCALIZED_VAR(NODE,N) (*BLOCK_NONLOCALIZED_VARS (NODE))[N]
1749 #define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks) 1788 #define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks)
1750 #define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext) 1789 #define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext)
1751 #define BLOCK_CHAIN(NODE) (BLOCK_CHECK (NODE)->block.chain) 1790 #define BLOCK_CHAIN(NODE) (BLOCK_CHECK (NODE)->block.chain)
1752 #define BLOCK_ABSTRACT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.abstract_origin) 1791 #define BLOCK_ABSTRACT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.abstract_origin)
1753 #define BLOCK_ABSTRACT(NODE) (BLOCK_CHECK (NODE)->block.abstract_flag) 1792 #define BLOCK_ORIGIN(NODE) \
1793 (BLOCK_ABSTRACT_ORIGIN(NODE) ? BLOCK_ABSTRACT_ORIGIN(NODE) : (NODE))
1754 #define BLOCK_DIE(NODE) (BLOCK_CHECK (NODE)->block.die) 1794 #define BLOCK_DIE(NODE) (BLOCK_CHECK (NODE)->block.die)
1755 1795
1756 /* True if BLOCK has the same ranges as its BLOCK_SUPERCONTEXT. */ 1796 /* True if BLOCK has the same ranges as its BLOCK_SUPERCONTEXT. */
1757 #define BLOCK_SAME_RANGE(NODE) (BLOCK_CHECK (NODE)->base.u.bits.nameless_flag) 1797 #define BLOCK_SAME_RANGE(NODE) (BLOCK_CHECK (NODE)->base.u.bits.nameless_flag)
1758 1798
1999 /* If set in an ARRAY_TYPE, indicates a string type (for languages 2039 /* If set in an ARRAY_TYPE, indicates a string type (for languages
2000 that distinguish string from array of char). 2040 that distinguish string from array of char).
2001 If set in a INTEGER_TYPE, indicates a character type. */ 2041 If set in a INTEGER_TYPE, indicates a character type. */
2002 #define TYPE_STRING_FLAG(NODE) (TYPE_CHECK (NODE)->type_common.string_flag) 2042 #define TYPE_STRING_FLAG(NODE) (TYPE_CHECK (NODE)->type_common.string_flag)
2003 2043
2004 /* For a VECTOR_TYPE, this is the number of sub-parts of the vector. */
2005 #define TYPE_VECTOR_SUBPARTS(VECTOR_TYPE) \
2006 (HOST_WIDE_INT_1U \
2007 << VECTOR_TYPE_CHECK (VECTOR_TYPE)->type_common.precision)
2008
2009 /* Set precision to n when we have 2^n sub-parts of the vector. */
2010 #define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \
2011 (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type_common.precision = exact_log2 (X))
2012
2013 /* Nonzero in a VECTOR_TYPE if the frontends should not emit warnings 2044 /* Nonzero in a VECTOR_TYPE if the frontends should not emit warnings
2014 about missing conversions to other vector types of the same size. */ 2045 about missing conversions to other vector types of the same size. */
2015 #define TYPE_VECTOR_OPAQUE(NODE) \ 2046 #define TYPE_VECTOR_OPAQUE(NODE) \
2016 (VECTOR_TYPE_CHECK (NODE)->base.default_def_flag) 2047 (VECTOR_TYPE_CHECK (NODE)->base.default_def_flag)
2017 2048
2070 /* Symtab field as an integer. Used by stabs generator in dbxout.c to 2101 /* Symtab field as an integer. Used by stabs generator in dbxout.c to
2071 hold the type's number in the generated stabs. */ 2102 hold the type's number in the generated stabs. */
2072 #define TYPE_SYMTAB_ADDRESS(NODE) \ 2103 #define TYPE_SYMTAB_ADDRESS(NODE) \
2073 (TYPE_CHECK (NODE)->type_common.symtab.address) 2104 (TYPE_CHECK (NODE)->type_common.symtab.address)
2074 2105
2075 /* Symtab field as a string. Used by COFF generator in sdbout.c to
2076 hold struct/union type tag names. */
2077 #define TYPE_SYMTAB_POINTER(NODE) \
2078 (TYPE_CHECK (NODE)->type_common.symtab.pointer)
2079
2080 /* Symtab field as a pointer to a DWARF DIE. Used by DWARF generator 2106 /* Symtab field as a pointer to a DWARF DIE. Used by DWARF generator
2081 in dwarf2out.c to point to the DIE generated for the type. */ 2107 in dwarf2out.c to point to the DIE generated for the type. */
2082 #define TYPE_SYMTAB_DIE(NODE) \ 2108 #define TYPE_SYMTAB_DIE(NODE) \
2083 (TYPE_CHECK (NODE)->type_common.symtab.die) 2109 (TYPE_CHECK (NODE)->type_common.symtab.die)
2084 2110
2085 /* The garbage collector needs to know the interpretation of the 2111 /* The garbage collector needs to know the interpretation of the
2086 symtab field. These constants represent the different types in the 2112 symtab field. These constants represent the different types in the
2087 union. */ 2113 union. */
2088 2114
2089 #define TYPE_SYMTAB_IS_ADDRESS (0) 2115 #define TYPE_SYMTAB_IS_ADDRESS (0)
2090 #define TYPE_SYMTAB_IS_POINTER (1) 2116 #define TYPE_SYMTAB_IS_DIE (1)
2091 #define TYPE_SYMTAB_IS_DIE (2)
2092 2117
2093 #define TYPE_LANG_SPECIFIC(NODE) \ 2118 #define TYPE_LANG_SPECIFIC(NODE) \
2094 (TYPE_CHECK (NODE)->type_with_lang_specific.lang_specific) 2119 (TYPE_CHECK (NODE)->type_with_lang_specific.lang_specific)
2095 2120
2096 #define TYPE_VALUES(NODE) (ENUMERAL_TYPE_CHECK (NODE)->type_non_common.values) 2121 #define TYPE_VALUES(NODE) (ENUMERAL_TYPE_CHECK (NODE)->type_non_common.values)
2291 /* This accessor returns TRUE if the decl it operates on was created 2316 /* This accessor returns TRUE if the decl it operates on was created
2292 by a front-end or back-end rather than by user code. In this case 2317 by a front-end or back-end rather than by user code. In this case
2293 builtin-ness is indicated by source location. */ 2318 builtin-ness is indicated by source location. */
2294 #define DECL_IS_BUILTIN(DECL) \ 2319 #define DECL_IS_BUILTIN(DECL) \
2295 (LOCATION_LOCUS (DECL_SOURCE_LOCATION (DECL)) <= BUILTINS_LOCATION) 2320 (LOCATION_LOCUS (DECL_SOURCE_LOCATION (DECL)) <= BUILTINS_LOCATION)
2296
2297 #define DECL_LOCATION_RANGE(NODE) \
2298 (get_decl_source_range (DECL_MINIMAL_CHECK (NODE)))
2299 2321
2300 /* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or 2322 /* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
2301 QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL, 2323 QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL,
2302 PARM_DECL, FUNCTION_DECL, LABEL_DECL, RESULT_DECL, and CONST_DECL 2324 PARM_DECL, FUNCTION_DECL, LABEL_DECL, RESULT_DECL, and CONST_DECL
2303 nodes, this points to either the FUNCTION_DECL for the containing 2325 nodes, this points to either the FUNCTION_DECL for the containing
2532 2554
2533 /* Returns nonzero if the DECL_RTL for NODE has already been set. */ 2555 /* Returns nonzero if the DECL_RTL for NODE has already been set. */
2534 #define DECL_RTL_SET_P(NODE) \ 2556 #define DECL_RTL_SET_P(NODE) \
2535 (HAS_RTL_P (NODE) && DECL_WRTL_CHECK (NODE)->decl_with_rtl.rtl != NULL) 2557 (HAS_RTL_P (NODE) && DECL_WRTL_CHECK (NODE)->decl_with_rtl.rtl != NULL)
2536 2558
2537 /* Copy the RTL from NODE1 to NODE2. If the RTL was not set for 2559 /* Copy the RTL from SRC_DECL to DST_DECL. If the RTL was not set for
2538 NODE1, it will not be set for NODE2; this is a lazy copy. */ 2560 SRC_DECL, it will not be set for DST_DECL; this is a lazy copy. */
2539 #define COPY_DECL_RTL(NODE1, NODE2) \ 2561 #define COPY_DECL_RTL(SRC_DECL, DST_DECL) \
2540 (DECL_WRTL_CHECK (NODE2)->decl_with_rtl.rtl \ 2562 (DECL_WRTL_CHECK (DST_DECL)->decl_with_rtl.rtl \
2541 = DECL_WRTL_CHECK (NODE1)->decl_with_rtl.rtl) 2563 = DECL_WRTL_CHECK (SRC_DECL)->decl_with_rtl.rtl)
2542 2564
2543 /* The DECL_RTL for NODE, if it is set, or NULL, if it is not set. */ 2565 /* The DECL_RTL for NODE, if it is set, or NULL, if it is not set. */
2544 #define DECL_RTL_IF_SET(NODE) (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL) 2566 #define DECL_RTL_IF_SET(NODE) (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL)
2545 2567
2546 #if (GCC_VERSION >= 2007) 2568 #if (GCC_VERSION >= 2007)
2622 's' (struct S) in record_component_aliases. The counterpart is that 2644 's' (struct S) in record_component_aliases. The counterpart is that
2623 accesses to s.i must not be given the alias set of the type of 'i' 2645 accesses to s.i must not be given the alias set of the type of 'i'
2624 (int) but instead directly that of the type of 's' (struct S). */ 2646 (int) but instead directly that of the type of 's' (struct S). */
2625 #define DECL_NONADDRESSABLE_P(NODE) \ 2647 #define DECL_NONADDRESSABLE_P(NODE) \
2626 (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_2) 2648 (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_2)
2649
2650 /* Used in a FIELD_DECL to indicate that this field is padding. */
2651 #define DECL_PADDING_P(NODE) \
2652 (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_3)
2627 2653
2628 /* A numeric unique identifier for a LABEL_DECL. The UID allocation is 2654 /* A numeric unique identifier for a LABEL_DECL. The UID allocation is
2629 dense, unique within any one function, and may be used to index arrays. 2655 dense, unique within any one function, and may be used to index arrays.
2630 If the value is -1, then no UID has been assigned. */ 2656 If the value is -1, then no UID has been assigned. */
2631 #define LABEL_DECL_UID(NODE) \ 2657 #define LABEL_DECL_UID(NODE) \
2727 #define DECL_ASSEMBLER_NAME_SET_P(NODE) \ 2753 #define DECL_ASSEMBLER_NAME_SET_P(NODE) \
2728 (DECL_ASSEMBLER_NAME_RAW (NODE) != NULL_TREE) 2754 (DECL_ASSEMBLER_NAME_RAW (NODE) != NULL_TREE)
2729 2755
2730 /* Set the DECL_ASSEMBLER_NAME for NODE to NAME. */ 2756 /* Set the DECL_ASSEMBLER_NAME for NODE to NAME. */
2731 #define SET_DECL_ASSEMBLER_NAME(NODE, NAME) \ 2757 #define SET_DECL_ASSEMBLER_NAME(NODE, NAME) \
2732 (DECL_ASSEMBLER_NAME_RAW (NODE) = (NAME)) 2758 overwrite_decl_assembler_name (NODE, NAME)
2733 2759
2734 /* Copy the DECL_ASSEMBLER_NAME from DECL1 to DECL2. Note that if DECL1's 2760 /* Copy the DECL_ASSEMBLER_NAME from SRC_DECL to DST_DECL. Note that
2735 DECL_ASSEMBLER_NAME has not yet been set, using this macro will not cause 2761 if SRC_DECL's DECL_ASSEMBLER_NAME has not yet been set, using this
2736 the DECL_ASSEMBLER_NAME of either DECL to be set. In other words, the 2762 macro will not cause the DECL_ASSEMBLER_NAME to be set, but will
2737 semantics of using this macro, are different than saying: 2763 clear DECL_ASSEMBLER_NAME of DST_DECL, if it was already set. In
2738 2764 other words, the semantics of using this macro, are different than
2739 SET_DECL_ASSEMBLER_NAME(DECL2, DECL_ASSEMBLER_NAME (DECL1)) 2765 saying:
2740 2766
2741 which will try to set the DECL_ASSEMBLER_NAME for DECL1. */ 2767 SET_DECL_ASSEMBLER_NAME(DST_DECL, DECL_ASSEMBLER_NAME (SRC_DECL))
2742 2768
2743 #define COPY_DECL_ASSEMBLER_NAME(DECL1, DECL2) \ 2769 which will try to set the DECL_ASSEMBLER_NAME for SRC_DECL. */
2744 SET_DECL_ASSEMBLER_NAME (DECL2, DECL_ASSEMBLER_NAME_RAW (DECL1)) 2770
2771 #define COPY_DECL_ASSEMBLER_NAME(SRC_DECL, DST_DECL) \
2772 SET_DECL_ASSEMBLER_NAME (DST_DECL, DECL_ASSEMBLER_NAME_RAW (SRC_DECL))
2745 2773
2746 /* Records the section name in a section attribute. Used to pass 2774 /* Records the section name in a section attribute. Used to pass
2747 the name from decl_attributes to make_function_rtl and make_decl_rtl. */ 2775 the name from decl_attributes to make_function_rtl and make_decl_rtl. */
2748 #define DECL_SECTION_NAME(NODE) decl_section_name (NODE) 2776 #define DECL_SECTION_NAME(NODE) decl_section_name (NODE)
2749 2777
2973 /* For FUNCTION_DECL, this holds a pointer to a structure ("struct function") 3001 /* For FUNCTION_DECL, this holds a pointer to a structure ("struct function")
2974 that describes the status of this function. */ 3002 that describes the status of this function. */
2975 #define DECL_STRUCT_FUNCTION(NODE) \ 3003 #define DECL_STRUCT_FUNCTION(NODE) \
2976 (FUNCTION_DECL_CHECK (NODE)->function_decl.f) 3004 (FUNCTION_DECL_CHECK (NODE)->function_decl.f)
2977 3005
2978 /* In a FUNCTION_DECL, nonzero means a built in function of a
2979 standard library or more generally a built in function that is
2980 recognized by optimizers and expanders.
2981
2982 Note that it is different from the DECL_IS_BUILTIN accessor. For
2983 instance, user declared prototypes of C library functions are not
2984 DECL_IS_BUILTIN but may be DECL_BUILT_IN. */
2985 #define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN)
2986 3006
2987 /* For a builtin function, identify which part of the compiler defined it. */ 3007 /* For a builtin function, identify which part of the compiler defined it. */
2988 #define DECL_BUILT_IN_CLASS(NODE) \ 3008 #define DECL_BUILT_IN_CLASS(NODE) \
2989 (FUNCTION_DECL_CHECK (NODE)->function_decl.built_in_class) 3009 (FUNCTION_DECL_CHECK (NODE)->function_decl.built_in_class)
2990 3010
3017 3037
3018 /* In FUNCTION_DECL, this is set if this function is a C++ destructor. 3038 /* In FUNCTION_DECL, this is set if this function is a C++ destructor.
3019 Devirtualization machinery uses this to track types in destruction. */ 3039 Devirtualization machinery uses this to track types in destruction. */
3020 #define DECL_CXX_DESTRUCTOR_P(NODE)\ 3040 #define DECL_CXX_DESTRUCTOR_P(NODE)\
3021 (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.cxx_destructor) 3041 (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.cxx_destructor)
3042
3043 /* In FUNCTION_DECL, this is set if this function is a lambda function. */
3044 #define DECL_LAMBDA_FUNCTION(NODE) \
3045 (FUNCTION_DECL_CHECK (NODE)->function_decl.lambda_function)
3022 3046
3023 /* In FUNCTION_DECL that represent an virtual method this is set when 3047 /* In FUNCTION_DECL that represent an virtual method this is set when
3024 the method is final. */ 3048 the method is final. */
3025 #define DECL_FINAL_P(NODE)\ 3049 #define DECL_FINAL_P(NODE)\
3026 (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.final) 3050 (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.final)
3639 3663
3640 inline bool 3664 inline bool
3641 id_equal (const char *str, const_tree id) 3665 id_equal (const char *str, const_tree id)
3642 { 3666 {
3643 return !strcmp (str, IDENTIFIER_POINTER (id)); 3667 return !strcmp (str, IDENTIFIER_POINTER (id));
3668 }
3669
3670 /* Return the number of elements in the VECTOR_TYPE given by NODE. */
3671
3672 inline poly_uint64
3673 TYPE_VECTOR_SUBPARTS (const_tree node)
3674 {
3675 STATIC_ASSERT (NUM_POLY_INT_COEFFS <= 2);
3676 unsigned int precision = VECTOR_TYPE_CHECK (node)->type_common.precision;
3677 if (NUM_POLY_INT_COEFFS == 2)
3678 {
3679 poly_uint64 res = 0;
3680 res.coeffs[0] = 1 << (precision & 0xff);
3681 if (precision & 0x100)
3682 res.coeffs[1] = 1 << (precision & 0xff);
3683 return res;
3684 }
3685 else
3686 return 1 << precision;
3687 }
3688
3689 /* Set the number of elements in VECTOR_TYPE NODE to SUBPARTS, which must
3690 satisfy valid_vector_subparts_p. */
3691
3692 inline void
3693 SET_TYPE_VECTOR_SUBPARTS (tree node, poly_uint64 subparts)
3694 {
3695 STATIC_ASSERT (NUM_POLY_INT_COEFFS <= 2);
3696 unsigned HOST_WIDE_INT coeff0 = subparts.coeffs[0];
3697 int index = exact_log2 (coeff0);
3698 gcc_assert (index >= 0);
3699 if (NUM_POLY_INT_COEFFS == 2)
3700 {
3701 unsigned HOST_WIDE_INT coeff1 = subparts.coeffs[1];
3702 gcc_assert (coeff1 == 0 || coeff1 == coeff0);
3703 VECTOR_TYPE_CHECK (node)->type_common.precision
3704 = index + (coeff1 != 0 ? 0x100 : 0);
3705 }
3706 else
3707 VECTOR_TYPE_CHECK (node)->type_common.precision = index;
3708 }
3709
3710 /* Return true if we can construct vector types with the given number
3711 of subparts. */
3712
3713 static inline bool
3714 valid_vector_subparts_p (poly_uint64 subparts)
3715 {
3716 unsigned HOST_WIDE_INT coeff0 = subparts.coeffs[0];
3717 if (!pow2p_hwi (coeff0))
3718 return false;
3719 if (NUM_POLY_INT_COEFFS == 2)
3720 {
3721 unsigned HOST_WIDE_INT coeff1 = subparts.coeffs[1];
3722 if (coeff1 != 0 && coeff1 != coeff0)
3723 return false;
3724 }
3725 return true;
3726 }
3727
3728 /* In NON_LVALUE_EXPR and VIEW_CONVERT_EXPR, set when this node is merely a
3729 wrapper added to express a location_t on behalf of the node's child
3730 (e.g. by maybe_wrap_with_location). */
3731
3732 #define EXPR_LOCATION_WRAPPER_P(NODE) \
3733 (TREE_CHECK2(NODE, NON_LVALUE_EXPR, VIEW_CONVERT_EXPR)->base.public_flag)
3734
3735 /* Test if EXP is merely a wrapper node, added to express a location_t
3736 on behalf of the node's child (e.g. by maybe_wrap_with_location). */
3737
3738 inline bool
3739 location_wrapper_p (const_tree exp)
3740 {
3741 /* A wrapper node has code NON_LVALUE_EXPR or VIEW_CONVERT_EXPR, and
3742 the flag EXPR_LOCATION_WRAPPER_P is set.
3743 It normally has the same type as its operand, but it can have a
3744 different one if the type of the operand has changed (e.g. when
3745 merging duplicate decls).
3746
3747 NON_LVALUE_EXPR is used for wrapping constants, apart from STRING_CST.
3748 VIEW_CONVERT_EXPR is used for wrapping non-constants and STRING_CST. */
3749 if ((TREE_CODE (exp) == NON_LVALUE_EXPR
3750 || TREE_CODE (exp) == VIEW_CONVERT_EXPR)
3751 && EXPR_LOCATION_WRAPPER_P (exp))
3752 return true;
3753 return false;
3754 }
3755
3756 /* Implementation of STRIP_ANY_LOCATION_WRAPPER. */
3757
3758 inline tree
3759 tree_strip_any_location_wrapper (tree exp)
3760 {
3761 if (location_wrapper_p (exp))
3762 return TREE_OPERAND (exp, 0);
3763 else
3764 return exp;
3644 } 3765 }
3645 3766
3646 #define error_mark_node global_trees[TI_ERROR_MARK] 3767 #define error_mark_node global_trees[TI_ERROR_MARK]
3647 3768
3648 #define intQI_type_node global_trees[TI_INTQI_TYPE] 3769 #define intQI_type_node global_trees[TI_INTQI_TYPE]
3715 #define complex_float_type_node global_trees[TI_COMPLEX_FLOAT_TYPE] 3836 #define complex_float_type_node global_trees[TI_COMPLEX_FLOAT_TYPE]
3716 #define complex_double_type_node global_trees[TI_COMPLEX_DOUBLE_TYPE] 3837 #define complex_double_type_node global_trees[TI_COMPLEX_DOUBLE_TYPE]
3717 #define complex_long_double_type_node global_trees[TI_COMPLEX_LONG_DOUBLE_TYPE] 3838 #define complex_long_double_type_node global_trees[TI_COMPLEX_LONG_DOUBLE_TYPE]
3718 3839
3719 #define COMPLEX_FLOATN_NX_TYPE_NODE(IDX) global_trees[TI_COMPLEX_FLOATN_NX_TYPE_FIRST + (IDX)] 3840 #define COMPLEX_FLOATN_NX_TYPE_NODE(IDX) global_trees[TI_COMPLEX_FLOATN_NX_TYPE_FIRST + (IDX)]
3720
3721 #define pointer_bounds_type_node global_trees[TI_POINTER_BOUNDS_TYPE]
3722 3841
3723 #define void_type_node global_trees[TI_VOID_TYPE] 3842 #define void_type_node global_trees[TI_VOID_TYPE]
3724 /* The C type `void *'. */ 3843 /* The C type `void *'. */
3725 #define ptr_type_node global_trees[TI_PTR_TYPE] 3844 #define ptr_type_node global_trees[TI_PTR_TYPE]
3726 /* The C type `const void *'. */ 3845 /* The C type `const void *'. */
3875 3994
3876 #define error_operand_p(NODE) \ 3995 #define error_operand_p(NODE) \
3877 ((NODE) == error_mark_node \ 3996 ((NODE) == error_mark_node \
3878 || ((NODE) && TREE_TYPE ((NODE)) == error_mark_node)) 3997 || ((NODE) && TREE_TYPE ((NODE)) == error_mark_node))
3879 3998
3999 /* Return the number of elements encoded directly in a VECTOR_CST. */
4000
4001 inline unsigned int
4002 vector_cst_encoded_nelts (const_tree t)
4003 {
4004 return VECTOR_CST_NPATTERNS (t) * VECTOR_CST_NELTS_PER_PATTERN (t);
4005 }
4006
3880 extern tree decl_assembler_name (tree); 4007 extern tree decl_assembler_name (tree);
4008 extern void overwrite_decl_assembler_name (tree decl, tree name);
3881 extern tree decl_comdat_group (const_tree); 4009 extern tree decl_comdat_group (const_tree);
3882 extern tree decl_comdat_group_id (const_tree); 4010 extern tree decl_comdat_group_id (const_tree);
3883 extern const char *decl_section_name (const_tree); 4011 extern const char *decl_section_name (const_tree);
3884 extern void set_decl_section_name (tree, const char *); 4012 extern void set_decl_section_name (tree, const char *);
3885 extern enum tls_model decl_tls_model (const_tree); 4013 extern enum tls_model decl_tls_model (const_tree);
4004 4132
4005 /* Constructs double_int from tree CST. */ 4133 /* Constructs double_int from tree CST. */
4006 4134
4007 extern tree double_int_to_tree (tree, double_int); 4135 extern tree double_int_to_tree (tree, double_int);
4008 4136
4009 extern tree wide_int_to_tree (tree type, const wide_int_ref &cst); 4137 extern tree wide_int_to_tree (tree type, const poly_wide_int_ref &cst);
4010 extern tree force_fit_type (tree, const wide_int_ref &, int, bool); 4138 extern tree force_fit_type (tree, const poly_wide_int_ref &, int, bool);
4011 4139
4012 /* Create an INT_CST node with a CST value zero extended. */ 4140 /* Create an INT_CST node with a CST value zero extended. */
4013 4141
4014 /* static inline */ 4142 /* static inline */
4015 extern tree build_int_cst (tree, HOST_WIDE_INT); 4143 extern tree build_int_cst (tree, poly_int64);
4016 extern tree build_int_cstu (tree type, unsigned HOST_WIDE_INT cst); 4144 extern tree build_int_cstu (tree type, poly_uint64);
4017 extern tree build_int_cst_type (tree, HOST_WIDE_INT); 4145 extern tree build_int_cst_type (tree, poly_int64);
4018 extern tree make_vector (unsigned CXX_MEM_STAT_INFO); 4146 extern tree make_vector (unsigned, unsigned CXX_MEM_STAT_INFO);
4019 extern tree build_vector (tree, vec<tree> CXX_MEM_STAT_INFO);
4020 extern tree build_vector_from_ctor (tree, vec<constructor_elt, va_gc> *); 4147 extern tree build_vector_from_ctor (tree, vec<constructor_elt, va_gc> *);
4021 extern tree build_vector_from_val (tree, tree); 4148 extern tree build_vector_from_val (tree, tree);
4149 extern tree build_vec_series (tree, tree, tree);
4150 extern tree build_index_vector (tree, poly_uint64, poly_uint64);
4022 extern void recompute_constructor_flags (tree); 4151 extern void recompute_constructor_flags (tree);
4023 extern void verify_constructor_flags (tree); 4152 extern void verify_constructor_flags (tree);
4024 extern tree build_constructor (tree, vec<constructor_elt, va_gc> *); 4153 extern tree build_constructor (tree, vec<constructor_elt, va_gc> *);
4025 extern tree build_constructor_single (tree, tree, tree); 4154 extern tree build_constructor_single (tree, tree, tree);
4026 extern tree build_constructor_from_list (tree, tree); 4155 extern tree build_constructor_from_list (tree, tree);
4027 extern tree build_constructor_va (tree, int, ...); 4156 extern tree build_constructor_va (tree, int, ...);
4157 extern tree build_clobber (tree);
4028 extern tree build_real_from_int_cst (tree, const_tree); 4158 extern tree build_real_from_int_cst (tree, const_tree);
4029 extern tree build_complex (tree, tree, tree); 4159 extern tree build_complex (tree, tree, tree);
4030 extern tree build_complex_inf (tree, bool); 4160 extern tree build_complex_inf (tree, bool);
4031 extern tree build_each_one_cst (tree); 4161 extern tree build_each_one_cst (tree);
4032 extern tree build_one_cst (tree); 4162 extern tree build_one_cst (tree);
4033 extern tree build_minus_one_cst (tree); 4163 extern tree build_minus_one_cst (tree);
4034 extern tree build_all_ones_cst (tree); 4164 extern tree build_all_ones_cst (tree);
4035 extern tree build_zero_cst (tree); 4165 extern tree build_zero_cst (tree);
4036 extern tree build_string (int, const char *); 4166 extern tree build_string (int, const char *);
4167 extern tree build_poly_int_cst (tree, const poly_wide_int_ref &);
4037 extern tree build_tree_list (tree, tree CXX_MEM_STAT_INFO); 4168 extern tree build_tree_list (tree, tree CXX_MEM_STAT_INFO);
4038 extern tree build_tree_list_vec (const vec<tree, va_gc> * CXX_MEM_STAT_INFO); 4169 extern tree build_tree_list_vec (const vec<tree, va_gc> * CXX_MEM_STAT_INFO);
4039 extern tree build_decl (location_t, enum tree_code, 4170 extern tree build_decl (location_t, enum tree_code,
4040 tree, tree CXX_MEM_STAT_INFO); 4171 tree, tree CXX_MEM_STAT_INFO);
4041 extern tree build_fn_decl (const char *, tree); 4172 extern tree build_fn_decl (const char *, tree);
4074 extern tree build_pointer_type_for_mode (tree, machine_mode, bool); 4205 extern tree build_pointer_type_for_mode (tree, machine_mode, bool);
4075 extern tree build_pointer_type (tree); 4206 extern tree build_pointer_type (tree);
4076 extern tree build_reference_type_for_mode (tree, machine_mode, bool); 4207 extern tree build_reference_type_for_mode (tree, machine_mode, bool);
4077 extern tree build_reference_type (tree); 4208 extern tree build_reference_type (tree);
4078 extern tree build_vector_type_for_mode (tree, machine_mode); 4209 extern tree build_vector_type_for_mode (tree, machine_mode);
4079 extern tree build_vector_type (tree innertype, int nunits); 4210 extern tree build_vector_type (tree, poly_int64);
4080 extern tree build_truth_vector_type (unsigned, unsigned); 4211 extern tree build_truth_vector_type (poly_uint64, poly_uint64);
4081 extern tree build_same_sized_truth_vector_type (tree vectype); 4212 extern tree build_same_sized_truth_vector_type (tree vectype);
4082 extern tree build_opaque_vector_type (tree innertype, int nunits); 4213 extern tree build_opaque_vector_type (tree, poly_int64);
4083 extern tree build_index_type (tree); 4214 extern tree build_index_type (tree);
4084 extern tree build_array_type (tree, tree, bool = false); 4215 extern tree build_array_type (tree, tree, bool = false);
4085 extern tree build_nonshared_array_type (tree, tree); 4216 extern tree build_nonshared_array_type (tree, tree);
4086 extern tree build_array_type_nelts (tree, unsigned HOST_WIDE_INT); 4217 extern tree build_array_type_nelts (tree, poly_uint64);
4087 extern tree build_function_type (tree, tree); 4218 extern tree build_function_type (tree, tree);
4088 extern tree build_function_type_list (tree, ...); 4219 extern tree build_function_type_list (tree, ...);
4089 extern tree build_varargs_function_type_list (tree, ...); 4220 extern tree build_varargs_function_type_list (tree, ...);
4090 extern tree build_function_type_array (tree, int, tree *); 4221 extern tree build_function_type_array (tree, int, tree *);
4091 extern tree build_varargs_function_type_array (tree, int, tree *); 4222 extern tree build_varargs_function_type_array (tree, int, tree *);
4106 extern tree chain_index (int, tree); 4237 extern tree chain_index (int, tree);
4107 4238
4108 #ifndef noCbC 4239 #ifndef noCbC
4109 extern tree build_code_segment_type (tree, tree); 4240 extern tree build_code_segment_type (tree, tree);
4110 #endif 4241 #endif
4111 extern int attribute_list_equal (const_tree, const_tree); 4242
4112 extern int attribute_list_contained (const_tree, const_tree); 4243 /* Arguments may be null. */
4113 extern int tree_int_cst_equal (const_tree, const_tree); 4244 extern int tree_int_cst_equal (const_tree, const_tree);
4114 4245
4115 extern bool tree_fits_shwi_p (const_tree) 4246 /* The following predicates are safe to call with a null argument. */
4116 ATTRIBUTE_PURE; 4247 extern bool tree_fits_shwi_p (const_tree) ATTRIBUTE_PURE;
4117 extern bool tree_fits_uhwi_p (const_tree) 4248 extern bool tree_fits_poly_int64_p (const_tree) ATTRIBUTE_PURE;
4118 ATTRIBUTE_PURE; 4249 extern bool tree_fits_uhwi_p (const_tree) ATTRIBUTE_PURE;
4119 extern HOST_WIDE_INT tree_to_shwi (const_tree); 4250 extern bool tree_fits_poly_uint64_p (const_tree) ATTRIBUTE_PURE;
4120 extern unsigned HOST_WIDE_INT tree_to_uhwi (const_tree); 4251
4252 extern HOST_WIDE_INT tree_to_shwi (const_tree)
4253 ATTRIBUTE_NONNULL (1) ATTRIBUTE_PURE;
4254 extern poly_int64 tree_to_poly_int64 (const_tree)
4255 ATTRIBUTE_NONNULL (1) ATTRIBUTE_PURE;
4256 extern unsigned HOST_WIDE_INT tree_to_uhwi (const_tree)
4257 ATTRIBUTE_NONNULL (1) ATTRIBUTE_PURE;
4258 extern poly_uint64 tree_to_poly_uint64 (const_tree)
4259 ATTRIBUTE_NONNULL (1) ATTRIBUTE_PURE;
4121 #if !defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 4003) 4260 #if !defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 4003)
4122 extern inline __attribute__ ((__gnu_inline__)) HOST_WIDE_INT 4261 extern inline __attribute__ ((__gnu_inline__)) HOST_WIDE_INT
4123 tree_to_shwi (const_tree t) 4262 tree_to_shwi (const_tree t)
4124 { 4263 {
4125 gcc_assert (tree_fits_shwi_p (t)); 4264 gcc_assert (tree_fits_shwi_p (t));
4130 tree_to_uhwi (const_tree t) 4269 tree_to_uhwi (const_tree t)
4131 { 4270 {
4132 gcc_assert (tree_fits_uhwi_p (t)); 4271 gcc_assert (tree_fits_uhwi_p (t));
4133 return TREE_INT_CST_LOW (t); 4272 return TREE_INT_CST_LOW (t);
4134 } 4273 }
4274 #if NUM_POLY_INT_COEFFS == 1
4275 extern inline __attribute__ ((__gnu_inline__)) poly_int64
4276 tree_to_poly_int64 (const_tree t)
4277 {
4278 gcc_assert (tree_fits_poly_int64_p (t));
4279 return TREE_INT_CST_LOW (t);
4280 }
4281
4282 extern inline __attribute__ ((__gnu_inline__)) poly_uint64
4283 tree_to_poly_uint64 (const_tree t)
4284 {
4285 gcc_assert (tree_fits_poly_uint64_p (t));
4286 return TREE_INT_CST_LOW (t);
4287 }
4288 #endif
4135 #endif 4289 #endif
4136 extern int tree_int_cst_sgn (const_tree); 4290 extern int tree_int_cst_sgn (const_tree);
4137 extern int tree_int_cst_sign_bit (const_tree); 4291 extern int tree_int_cst_sign_bit (const_tree);
4138 extern unsigned int tree_int_cst_min_precision (tree, signop); 4292 extern unsigned int tree_int_cst_min_precision (tree, signop);
4139 extern tree strip_array_types (tree); 4293 extern tree strip_array_types (tree);
4140 extern tree excess_precision_type (tree); 4294 extern tree excess_precision_type (tree);
4141 extern bool valid_constant_size_p (const_tree); 4295 extern bool valid_constant_size_p (const_tree);
4142 4296
4297 /* Return true if T holds a value that can be represented as a poly_int64
4298 without loss of precision. Store the value in *VALUE if so. */
4299
4300 inline bool
4301 poly_int_tree_p (const_tree t, poly_int64_pod *value)
4302 {
4303 if (tree_fits_poly_int64_p (t))
4304 {
4305 *value = tree_to_poly_int64 (t);
4306 return true;
4307 }
4308 return false;
4309 }
4310
4311 /* Return true if T holds a value that can be represented as a poly_uint64
4312 without loss of precision. Store the value in *VALUE if so. */
4313
4314 inline bool
4315 poly_int_tree_p (const_tree t, poly_uint64_pod *value)
4316 {
4317 if (tree_fits_poly_uint64_p (t))
4318 {
4319 *value = tree_to_poly_uint64 (t);
4320 return true;
4321 }
4322 return false;
4323 }
4143 4324
4144 /* From expmed.c. Since rtl.h is included after tree.h, we can't 4325 /* From expmed.c. Since rtl.h is included after tree.h, we can't
4145 put the prototype here. Rtl.h does declare the prototype if 4326 put the prototype here. Rtl.h does declare the prototype if
4146 tree.h had been included. */ 4327 tree.h had been included. */
4147 4328
4261 /* Returns the first FIELD_DECL in a type. */ 4442 /* Returns the first FIELD_DECL in a type. */
4262 4443
4263 extern tree first_field (const_tree); 4444 extern tree first_field (const_tree);
4264 4445
4265 /* Given an initializer INIT, return TRUE if INIT is zero or some 4446 /* Given an initializer INIT, return TRUE if INIT is zero or some
4266 aggregate of zeros. Otherwise return FALSE. */ 4447 aggregate of zeros. Otherwise return FALSE. If NONZERO is not
4267 4448 null, set *NONZERO if and only if INIT is known not to be all
4268 extern bool initializer_zerop (const_tree); 4449 zeros. The combination of return value of false and *NONZERO
4450 false implies that INIT may but need not be all zeros. Other
4451 combinations indicate definitive answers. */
4452
4453 extern bool initializer_zerop (const_tree, bool * = NULL);
4454
4455 extern wide_int vector_cst_int_elt (const_tree, unsigned int);
4456 extern tree vector_cst_elt (const_tree, unsigned int);
4269 4457
4270 /* Given a vector VEC, return its first element if all elements are 4458 /* Given a vector VEC, return its first element if all elements are
4271 the same. Otherwise return NULL_TREE. */ 4459 the same. Otherwise return NULL_TREE. */
4272 4460
4273 extern tree uniform_vector_p (const_tree); 4461 extern tree uniform_vector_p (const_tree);
4276 4464
4277 extern vec<tree, va_gc> *ctor_to_vec (tree); 4465 extern vec<tree, va_gc> *ctor_to_vec (tree);
4278 4466
4279 /* zerop (tree x) is nonzero if X is a constant of value 0. */ 4467 /* zerop (tree x) is nonzero if X is a constant of value 0. */
4280 4468
4281 extern int zerop (const_tree); 4469 extern bool zerop (const_tree);
4282 4470
4283 /* integer_zerop (tree x) is nonzero if X is an integer constant of value 0. */ 4471 /* integer_zerop (tree x) is nonzero if X is an integer constant of value 0. */
4284 4472
4285 extern int integer_zerop (const_tree); 4473 extern bool integer_zerop (const_tree);
4286 4474
4287 /* integer_onep (tree x) is nonzero if X is an integer constant of value 1. */ 4475 /* integer_onep (tree x) is nonzero if X is an integer constant of value 1. */
4288 4476
4289 extern int integer_onep (const_tree); 4477 extern bool integer_onep (const_tree);
4290 4478
4291 /* integer_onep (tree x) is nonzero if X is an integer constant of value 1, or 4479 /* integer_onep (tree x) is nonzero if X is an integer constant of value 1, or
4292 a vector or complex where each part is 1. */ 4480 a vector or complex where each part is 1. */
4293 4481
4294 extern int integer_each_onep (const_tree); 4482 extern bool integer_each_onep (const_tree);
4295 4483
4296 /* integer_all_onesp (tree x) is nonzero if X is an integer constant 4484 /* integer_all_onesp (tree x) is nonzero if X is an integer constant
4297 all of whose significant bits are 1. */ 4485 all of whose significant bits are 1. */
4298 4486
4299 extern int integer_all_onesp (const_tree); 4487 extern bool integer_all_onesp (const_tree);
4300 4488
4301 /* integer_minus_onep (tree x) is nonzero if X is an integer constant of 4489 /* integer_minus_onep (tree x) is nonzero if X is an integer constant of
4302 value -1. */ 4490 value -1. */
4303 4491
4304 extern int integer_minus_onep (const_tree); 4492 extern bool integer_minus_onep (const_tree);
4305 4493
4306 /* integer_pow2p (tree x) is nonzero is X is an integer constant with 4494 /* integer_pow2p (tree x) is nonzero is X is an integer constant with
4307 exactly one bit 1. */ 4495 exactly one bit 1. */
4308 4496
4309 extern int integer_pow2p (const_tree); 4497 extern bool integer_pow2p (const_tree);
4310 4498
4311 /* integer_nonzerop (tree x) is nonzero if X is an integer constant 4499 /* integer_nonzerop (tree x) is nonzero if X is an integer constant
4312 with a nonzero value. */ 4500 with a nonzero value. */
4313 4501
4314 extern int integer_nonzerop (const_tree); 4502 extern bool integer_nonzerop (const_tree);
4315 4503
4316 /* integer_truep (tree x) is nonzero if X is an integer constant of value 1 or 4504 /* integer_truep (tree x) is nonzero if X is an integer constant of value 1 or
4317 a vector where each element is an integer constant of value -1. */ 4505 a vector where each element is an integer constant of value -1. */
4318 4506
4319 extern int integer_truep (const_tree); 4507 extern bool integer_truep (const_tree);
4320 4508
4321 extern bool cst_and_fits_in_hwi (const_tree); 4509 extern bool cst_and_fits_in_hwi (const_tree);
4322 extern tree num_ending_zeros (const_tree); 4510 extern tree num_ending_zeros (const_tree);
4323 4511
4324 /* fixed_zerop (tree x) is nonzero if X is a fixed-point constant of 4512 /* fixed_zerop (tree x) is nonzero if X is a fixed-point constant of
4325 value 0. */ 4513 value 0. */
4326 4514
4327 extern int fixed_zerop (const_tree); 4515 extern bool fixed_zerop (const_tree);
4328 4516
4329 /* staticp (tree x) is nonzero if X is a reference to data allocated 4517 /* staticp (tree x) is nonzero if X is a reference to data allocated
4330 at a fixed address in memory. Returns the outermost data. */ 4518 at a fixed address in memory. Returns the outermost data. */
4331 4519
4332 extern tree staticp (tree); 4520 extern tree staticp (tree);
4521 /* Given a DECL or TYPE, return the scope in which it was declared, or 4709 /* Given a DECL or TYPE, return the scope in which it was declared, or
4522 NUL_TREE if there is no containing scope. */ 4710 NUL_TREE if there is no containing scope. */
4523 4711
4524 extern tree get_containing_scope (const_tree); 4712 extern tree get_containing_scope (const_tree);
4525 4713
4714 /* Returns the ultimate TRANSLATION_UNIT_DECL context of DECL or NULL. */
4715
4716 extern const_tree get_ultimate_context (const_tree);
4717
4526 /* Return the FUNCTION_DECL which provides this _DECL with its context, 4718 /* Return the FUNCTION_DECL which provides this _DECL with its context,
4527 or zero if none. */ 4719 or zero if none. */
4528 extern tree decl_function_context (const_tree); 4720 extern tree decl_function_context (const_tree);
4529 4721
4530 /* Return the RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE which provides 4722 /* Return the RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE which provides
4531 this _DECL with its context, or zero if none. */ 4723 this _DECL with its context, or zero if none. */
4532 extern tree decl_type_context (const_tree); 4724 extern tree decl_type_context (const_tree);
4533 4725
4534 /* Return 1 if EXPR is the real constant zero. */ 4726 /* Return true if EXPR is the real constant zero. */
4535 extern int real_zerop (const_tree); 4727 extern bool real_zerop (const_tree);
4536 4728
4537 /* Initialize the iterator I with arguments from function FNDECL */ 4729 /* Initialize the iterator I with arguments from function FNDECL */
4538 4730
4539 static inline void 4731 static inline void
4540 function_args_iter_init (function_args_iterator *i, const_tree fntype) 4732 function_args_iter_init (function_args_iterator *i, const_tree fntype)
4630 extern tree tree_strip_nop_conversions (tree); 4822 extern tree tree_strip_nop_conversions (tree);
4631 extern tree tree_strip_sign_nop_conversions (tree); 4823 extern tree tree_strip_sign_nop_conversions (tree);
4632 extern const_tree strip_invariant_refs (const_tree); 4824 extern const_tree strip_invariant_refs (const_tree);
4633 extern tree lhd_gcc_personality (void); 4825 extern tree lhd_gcc_personality (void);
4634 extern void assign_assembler_name_if_needed (tree); 4826 extern void assign_assembler_name_if_needed (tree);
4635 extern void warn_deprecated_use (tree, tree); 4827 extern bool warn_deprecated_use (tree, tree);
4636 extern void cache_integer_cst (tree); 4828 extern void cache_integer_cst (tree);
4637 extern const char *combined_fn_name (combined_fn); 4829 extern const char *combined_fn_name (combined_fn);
4638 4830
4639 /* Compare and hash for any structure which begins with a canonical 4831 /* Compare and hash for any structure which begins with a canonical
4640 pointer. Assumes all pointers are interchangeable, which is sort 4832 pointer. Assumes all pointers are interchangeable, which is sort
4684 return COMPLETE_TYPE_P (type) 4876 return COMPLETE_TYPE_P (type)
4685 || (TREE_CODE (type) == ARRAY_TYPE 4877 || (TREE_CODE (type) == ARRAY_TYPE
4686 && COMPLETE_TYPE_P (TREE_TYPE (type))); 4878 && COMPLETE_TYPE_P (TREE_TYPE (type)));
4687 } 4879 }
4688 4880
4881 /* Return true if the value of T could be represented as a poly_widest_int. */
4882
4883 inline bool
4884 poly_int_tree_p (const_tree t)
4885 {
4886 return (TREE_CODE (t) == INTEGER_CST || POLY_INT_CST_P (t));
4887 }
4888
4889 /* Return the bit size of BIT_FIELD_REF T, in cases where it is known
4890 to be a poly_uint64. (This is always true at the gimple level.) */
4891
4892 inline poly_uint64
4893 bit_field_size (const_tree t)
4894 {
4895 return tree_to_poly_uint64 (TREE_OPERAND (t, 1));
4896 }
4897
4898 /* Return the starting bit offset of BIT_FIELD_REF T, in cases where it is
4899 known to be a poly_uint64. (This is always true at the gimple level.) */
4900
4901 inline poly_uint64
4902 bit_field_offset (const_tree t)
4903 {
4904 return tree_to_poly_uint64 (TREE_OPERAND (t, 2));
4905 }
4906
4689 extern tree strip_float_extensions (tree); 4907 extern tree strip_float_extensions (tree);
4690 extern int really_constant_p (const_tree); 4908 extern bool really_constant_p (const_tree);
4909 extern bool ptrdiff_tree_p (const_tree, poly_int64_pod *);
4691 extern bool decl_address_invariant_p (const_tree); 4910 extern bool decl_address_invariant_p (const_tree);
4692 extern bool decl_address_ip_invariant_p (const_tree); 4911 extern bool decl_address_ip_invariant_p (const_tree);
4693 extern bool int_fits_type_p (const_tree, const_tree); 4912 extern bool int_fits_type_p (const_tree, const_tree)
4913 ATTRIBUTE_NONNULL (1) ATTRIBUTE_NONNULL (2) ATTRIBUTE_PURE;
4694 #ifndef GENERATOR_FILE 4914 #ifndef GENERATOR_FILE
4695 extern void get_type_static_bounds (const_tree, mpz_t, mpz_t); 4915 extern void get_type_static_bounds (const_tree, mpz_t, mpz_t);
4696 #endif 4916 #endif
4697 extern bool variably_modified_type_p (tree, tree); 4917 extern bool variably_modified_type_p (tree, tree);
4698 extern int tree_log2 (const_tree); 4918 extern int tree_log2 (const_tree);
4715 inchash::add_expr (tree, hstate); 4935 inchash::add_expr (tree, hstate);
4716 return hstate.end (); 4936 return hstate.end ();
4717 } 4937 }
4718 4938
4719 extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT); 4939 extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT);
4720 extern int type_list_equal (const_tree, const_tree); 4940 extern bool type_list_equal (const_tree, const_tree);
4721 extern int chain_member (const_tree, const_tree); 4941 extern bool chain_member (const_tree, const_tree);
4722 extern void dump_tree_statistics (void); 4942 extern void dump_tree_statistics (void);
4723 extern void recompute_tree_invariant_for_addr_expr (tree); 4943 extern void recompute_tree_invariant_for_addr_expr (tree);
4724 extern bool needs_to_live_in_memory (const_tree); 4944 extern bool needs_to_live_in_memory (const_tree);
4725 extern tree reconstruct_complex_type (tree, tree); 4945 extern tree reconstruct_complex_type (tree, tree);
4726 extern int real_onep (const_tree); 4946 extern bool real_onep (const_tree);
4727 extern int real_minus_onep (const_tree); 4947 extern bool real_minus_onep (const_tree);
4728 extern void init_ttree (void); 4948 extern void init_ttree (void);
4729 extern void build_common_tree_nodes (bool); 4949 extern void build_common_tree_nodes (bool);
4730 extern void build_common_builtin_nodes (void); 4950 extern void build_common_builtin_nodes (void);
4731 extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int); 4951 extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int);
4732 extern tree build_nonstandard_boolean_type (unsigned HOST_WIDE_INT); 4952 extern tree build_nonstandard_boolean_type (unsigned HOST_WIDE_INT);
4737 extern tree tree_block (tree); 4957 extern tree tree_block (tree);
4738 extern void tree_set_block (tree, tree); 4958 extern void tree_set_block (tree, tree);
4739 extern location_t *block_nonartificial_location (tree); 4959 extern location_t *block_nonartificial_location (tree);
4740 extern location_t tree_nonartificial_location (tree); 4960 extern location_t tree_nonartificial_location (tree);
4741 extern tree block_ultimate_origin (const_tree); 4961 extern tree block_ultimate_origin (const_tree);
4742 extern tree get_binfo_at_offset (tree, HOST_WIDE_INT, tree); 4962 extern tree get_binfo_at_offset (tree, poly_int64, tree);
4743 #ifndef noCbC 4963 #ifndef noCbC
4744 extern tree build_addr (tree); 4964 extern tree build_addr (tree);
4745 #endif 4965 #endif
4746
4747 extern bool virtual_method_call_p (const_tree); 4966 extern bool virtual_method_call_p (const_tree);
4748 extern tree obj_type_ref_class (const_tree ref); 4967 extern tree obj_type_ref_class (const_tree ref);
4749 extern bool types_same_for_odr (const_tree type1, const_tree type2, 4968 extern bool types_same_for_odr (const_tree type1, const_tree type2,
4750 bool strict=false); 4969 bool strict=false);
4751 extern bool contains_bitfld_component_ref_p (const_tree); 4970 extern bool contains_bitfld_component_ref_p (const_tree);
4772 4991
4773 /* Return a tree of sizetype representing the size, in bytes, of the element 4992 /* Return a tree of sizetype representing the size, in bytes, of the element
4774 of EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */ 4993 of EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */
4775 extern tree array_ref_element_size (tree); 4994 extern tree array_ref_element_size (tree);
4776 4995
4996 /* Return a typenode for the "standard" C type with a given name. */
4997 extern tree get_typenode_from_name (const char *);
4998
4777 /* Return a tree representing the upper bound of the array mentioned in 4999 /* Return a tree representing the upper bound of the array mentioned in
4778 EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */ 5000 EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */
4779 extern tree array_ref_up_bound (tree); 5001 extern tree array_ref_up_bound (tree);
4780 5002
4781 /* Return a tree representing the lower bound of the array mentioned in 5003 /* Return a tree representing the lower bound of the array mentioned in
4871 5093
4872 #define tree_vec_map_eq tree_map_base_eq 5094 #define tree_vec_map_eq tree_map_base_eq
4873 #define tree_vec_map_hash tree_decl_map_hash 5095 #define tree_vec_map_hash tree_decl_map_hash
4874 #define tree_vec_map_marked_p tree_map_base_marked_p 5096 #define tree_vec_map_marked_p tree_map_base_marked_p
4875 5097
5098 /* A hash_map of two trees for use with GTY((cache)). Garbage collection for
5099 such a map will not mark keys, and will mark values if the key is already
5100 marked. */
5101 struct tree_cache_traits
5102 : simple_cache_map_traits<default_hash_traits<tree>, tree> { };
5103 typedef hash_map<tree,tree,tree_cache_traits> tree_cache_map;
5104
4876 /* Initialize the abstract argument list iterator object ITER with the 5105 /* Initialize the abstract argument list iterator object ITER with the
4877 arguments from CALL_EXPR node EXP. */ 5106 arguments from CALL_EXPR node EXP. */
4878 static inline void 5107 static inline void
4879 init_call_expr_arg_iterator (tree exp, call_expr_arg_iterator *iter) 5108 init_call_expr_arg_iterator (tree exp, call_expr_arg_iterator *iter)
4880 { 5109 {
5118 extern bool anon_aggrname_p (const_tree); 5347 extern bool anon_aggrname_p (const_tree);
5119 5348
5120 /* The tree and const_tree overload templates. */ 5349 /* The tree and const_tree overload templates. */
5121 namespace wi 5350 namespace wi
5122 { 5351 {
5352 class unextended_tree
5353 {
5354 private:
5355 const_tree m_t;
5356
5357 public:
5358 unextended_tree () {}
5359 unextended_tree (const_tree t) : m_t (t) {}
5360
5361 unsigned int get_precision () const;
5362 const HOST_WIDE_INT *get_val () const;
5363 unsigned int get_len () const;
5364 const_tree get_tree () const { return m_t; }
5365 };
5366
5367 template <>
5368 struct int_traits <unextended_tree>
5369 {
5370 static const enum precision_type precision_type = VAR_PRECISION;
5371 static const bool host_dependent_precision = false;
5372 static const bool is_sign_extended = false;
5373 };
5374
5123 template <int N> 5375 template <int N>
5124 class extended_tree 5376 class extended_tree
5125 { 5377 {
5126 private: 5378 private:
5127 const_tree m_t; 5379 const_tree m_t;
5128 5380
5129 public: 5381 public:
5382 extended_tree () {}
5130 extended_tree (const_tree); 5383 extended_tree (const_tree);
5131 5384
5132 unsigned int get_precision () const; 5385 unsigned int get_precision () const;
5133 const HOST_WIDE_INT *get_val () const; 5386 const HOST_WIDE_INT *get_val () const;
5134 unsigned int get_len () const; 5387 unsigned int get_len () const;
5388 const_tree get_tree () const { return m_t; }
5135 }; 5389 };
5136 5390
5137 template <int N> 5391 template <int N>
5138 struct int_traits <extended_tree <N> > 5392 struct int_traits <extended_tree <N> >
5139 { 5393 {
5141 static const bool host_dependent_precision = false; 5395 static const bool host_dependent_precision = false;
5142 static const bool is_sign_extended = true; 5396 static const bool is_sign_extended = true;
5143 static const unsigned int precision = N; 5397 static const unsigned int precision = N;
5144 }; 5398 };
5145 5399
5146 typedef const generic_wide_int <extended_tree <WIDE_INT_MAX_PRECISION> > 5400 typedef extended_tree <WIDE_INT_MAX_PRECISION> widest_extended_tree;
5147 tree_to_widest_ref; 5401 typedef extended_tree <ADDR_MAX_PRECISION> offset_extended_tree;
5148 typedef const generic_wide_int <extended_tree <ADDR_MAX_PRECISION> > 5402
5149 tree_to_offset_ref; 5403 typedef const generic_wide_int <widest_extended_tree> tree_to_widest_ref;
5404 typedef const generic_wide_int <offset_extended_tree> tree_to_offset_ref;
5150 typedef const generic_wide_int<wide_int_ref_storage<false, false> > 5405 typedef const generic_wide_int<wide_int_ref_storage<false, false> >
5151 tree_to_wide_ref; 5406 tree_to_wide_ref;
5152 5407
5153 tree_to_widest_ref to_widest (const_tree); 5408 tree_to_widest_ref to_widest (const_tree);
5154 tree_to_offset_ref to_offset (const_tree); 5409 tree_to_offset_ref to_offset (const_tree);
5155 tree_to_wide_ref to_wide (const_tree); 5410 tree_to_wide_ref to_wide (const_tree);
5156 wide_int to_wide (const_tree, unsigned int); 5411 wide_int to_wide (const_tree, unsigned int);
5157 } 5412
5413 typedef const poly_int <NUM_POLY_INT_COEFFS,
5414 generic_wide_int <widest_extended_tree> >
5415 tree_to_poly_widest_ref;
5416 typedef const poly_int <NUM_POLY_INT_COEFFS,
5417 generic_wide_int <offset_extended_tree> >
5418 tree_to_poly_offset_ref;
5419 typedef const poly_int <NUM_POLY_INT_COEFFS,
5420 generic_wide_int <unextended_tree> >
5421 tree_to_poly_wide_ref;
5422
5423 tree_to_poly_widest_ref to_poly_widest (const_tree);
5424 tree_to_poly_offset_ref to_poly_offset (const_tree);
5425 tree_to_poly_wide_ref to_poly_wide (const_tree);
5426
5427 template <int N>
5428 struct ints_for <generic_wide_int <extended_tree <N> >, CONST_PRECISION>
5429 {
5430 typedef generic_wide_int <extended_tree <N> > extended;
5431 static extended zero (const extended &);
5432 };
5433
5434 template <>
5435 struct ints_for <generic_wide_int <unextended_tree>, VAR_PRECISION>
5436 {
5437 typedef generic_wide_int <unextended_tree> unextended;
5438 static unextended zero (const unextended &);
5439 };
5440 }
5441
5442 /* Used to convert a tree to a widest2_int like this:
5443 widest2_int foo = widest2_int_cst (some_tree). */
5444 typedef generic_wide_int <wi::extended_tree <WIDE_INT_MAX_PRECISION * 2> >
5445 widest2_int_cst;
5158 5446
5159 /* Refer to INTEGER_CST T as though it were a widest_int. 5447 /* Refer to INTEGER_CST T as though it were a widest_int.
5160 5448
5161 This function gives T's actual numerical value, influenced by the 5449 This function gives T's actual numerical value, influenced by the
5162 signedness of its type. For example, a signed byte with just the 5450 signedness of its type. For example, a signed byte with just the
5296 and needs to be as fast as possible, so there is no fallback for 5584 and needs to be as fast as possible, so there is no fallback for
5297 other casees. */ 5585 other casees. */
5298 gcc_unreachable (); 5586 gcc_unreachable ();
5299 } 5587 }
5300 5588
5589 inline unsigned int
5590 wi::unextended_tree::get_precision () const
5591 {
5592 return TYPE_PRECISION (TREE_TYPE (m_t));
5593 }
5594
5595 inline const HOST_WIDE_INT *
5596 wi::unextended_tree::get_val () const
5597 {
5598 return &TREE_INT_CST_ELT (m_t, 0);
5599 }
5600
5601 inline unsigned int
5602 wi::unextended_tree::get_len () const
5603 {
5604 return TREE_INT_CST_NUNITS (m_t);
5605 }
5606
5607 /* Return the value of a POLY_INT_CST in its native precision. */
5608
5609 inline wi::tree_to_poly_wide_ref
5610 poly_int_cst_value (const_tree x)
5611 {
5612 poly_int <NUM_POLY_INT_COEFFS, generic_wide_int <wi::unextended_tree> > res;
5613 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
5614 res.coeffs[i] = POLY_INT_CST_COEFF (x, i);
5615 return res;
5616 }
5617
5618 /* Access INTEGER_CST or POLY_INT_CST tree T as if it were a
5619 poly_widest_int. See wi::to_widest for more details. */
5620
5621 inline wi::tree_to_poly_widest_ref
5622 wi::to_poly_widest (const_tree t)
5623 {
5624 if (POLY_INT_CST_P (t))
5625 {
5626 poly_int <NUM_POLY_INT_COEFFS,
5627 generic_wide_int <widest_extended_tree> > res;
5628 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
5629 res.coeffs[i] = POLY_INT_CST_COEFF (t, i);
5630 return res;
5631 }
5632 return t;
5633 }
5634
5635 /* Access INTEGER_CST or POLY_INT_CST tree T as if it were a
5636 poly_offset_int. See wi::to_offset for more details. */
5637
5638 inline wi::tree_to_poly_offset_ref
5639 wi::to_poly_offset (const_tree t)
5640 {
5641 if (POLY_INT_CST_P (t))
5642 {
5643 poly_int <NUM_POLY_INT_COEFFS,
5644 generic_wide_int <offset_extended_tree> > res;
5645 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
5646 res.coeffs[i] = POLY_INT_CST_COEFF (t, i);
5647 return res;
5648 }
5649 return t;
5650 }
5651
5652 /* Access INTEGER_CST or POLY_INT_CST tree T as if it were a
5653 poly_wide_int. See wi::to_wide for more details. */
5654
5655 inline wi::tree_to_poly_wide_ref
5656 wi::to_poly_wide (const_tree t)
5657 {
5658 if (POLY_INT_CST_P (t))
5659 return poly_int_cst_value (t);
5660 return t;
5661 }
5662
5663 template <int N>
5664 inline generic_wide_int <wi::extended_tree <N> >
5665 wi::ints_for <generic_wide_int <wi::extended_tree <N> >,
5666 wi::CONST_PRECISION>::zero (const extended &x)
5667 {
5668 return build_zero_cst (TREE_TYPE (x.get_tree ()));
5669 }
5670
5671 inline generic_wide_int <wi::unextended_tree>
5672 wi::ints_for <generic_wide_int <wi::unextended_tree>,
5673 wi::VAR_PRECISION>::zero (const unextended &x)
5674 {
5675 return build_zero_cst (TREE_TYPE (x.get_tree ()));
5676 }
5677
5301 namespace wi 5678 namespace wi
5302 { 5679 {
5303 template <typename T> 5680 template <typename T>
5304 bool fits_to_boolean_p (const T &x, const_tree); 5681 bool fits_to_boolean_p (const T &x, const_tree);
5305 5682
5313 5690
5314 template <typename T> 5691 template <typename T>
5315 bool 5692 bool
5316 wi::fits_to_boolean_p (const T &x, const_tree type) 5693 wi::fits_to_boolean_p (const T &x, const_tree type)
5317 { 5694 {
5318 return eq_p (x, 0) || eq_p (x, TYPE_UNSIGNED (type) ? 1 : -1); 5695 typedef typename poly_int_traits<T>::int_type int_type;
5696 return (known_eq (x, int_type (0))
5697 || known_eq (x, int_type (TYPE_UNSIGNED (type) ? 1 : -1)));
5319 } 5698 }
5320 5699
5321 template <typename T> 5700 template <typename T>
5322 bool 5701 bool
5323 wi::fits_to_tree_p (const T &x, const_tree type) 5702 wi::fits_to_tree_p (const T &x, const_tree type)
5326 transformations assume that they can only take values 0 and +/-1. */ 5705 transformations assume that they can only take values 0 and +/-1. */
5327 if (TREE_CODE (type) == BOOLEAN_TYPE) 5706 if (TREE_CODE (type) == BOOLEAN_TYPE)
5328 return fits_to_boolean_p (x, type); 5707 return fits_to_boolean_p (x, type);
5329 5708
5330 if (TYPE_UNSIGNED (type)) 5709 if (TYPE_UNSIGNED (type))
5331 return eq_p (x, zext (x, TYPE_PRECISION (type))); 5710 return known_eq (x, zext (x, TYPE_PRECISION (type)));
5332 else 5711 else
5333 return eq_p (x, sext (x, TYPE_PRECISION (type))); 5712 return known_eq (x, sext (x, TYPE_PRECISION (type)));
5334 } 5713 }
5335 5714
5336 /* Produce the smallest number that is represented in TYPE. The precision 5715 /* Produce the smallest number that is represented in TYPE. The precision
5337 and sign are taken from TYPE. */ 5716 and sign are taken from TYPE. */
5338 inline wide_int 5717 inline wide_int
5387 extern bool complete_ctor_at_level_p (const_tree, HOST_WIDE_INT, const_tree); 5766 extern bool complete_ctor_at_level_p (const_tree, HOST_WIDE_INT, const_tree);
5388 5767
5389 /* Given an expression EXP that is a handled_component_p, 5768 /* Given an expression EXP that is a handled_component_p,
5390 look for the ultimate containing object, which is returned and specify 5769 look for the ultimate containing object, which is returned and specify
5391 the access position and size. */ 5770 the access position and size. */
5392 extern tree get_inner_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *, 5771 extern tree get_inner_reference (tree, poly_int64_pod *, poly_int64_pod *,
5393 tree *, machine_mode *, int *, int *, int *); 5772 tree *, machine_mode *, int *, int *, int *);
5394 5773
5395 extern tree build_personality_function (const char *); 5774 extern tree build_personality_function (const char *);
5396 5775
5397 struct GTY(()) int_n_trees_t { 5776 struct GTY(()) int_n_trees_t {
5440 extern void gt_ggc_mx (tree &); 5819 extern void gt_ggc_mx (tree &);
5441 extern void gt_pch_nx (tree &); 5820 extern void gt_pch_nx (tree &);
5442 extern void gt_pch_nx (tree &, gt_pointer_operator, void *); 5821 extern void gt_pch_nx (tree &, gt_pointer_operator, void *);
5443 5822
5444 extern bool nonnull_arg_p (const_tree); 5823 extern bool nonnull_arg_p (const_tree);
5445 extern bool is_redundant_typedef (const_tree); 5824 extern bool default_is_empty_record (const_tree);
5825 extern HOST_WIDE_INT arg_int_size_in_bytes (const_tree);
5826 extern tree arg_size_in_bytes (const_tree);
5827 extern bool expr_type_first_operand_type_p (tree_code);
5446 5828
5447 extern location_t 5829 extern location_t
5448 set_source_range (tree expr, location_t start, location_t finish); 5830 set_source_range (tree expr, location_t start, location_t finish);
5449 5831
5450 extern location_t 5832 extern location_t
5451 set_source_range (tree expr, source_range src_range); 5833 set_source_range (tree expr, source_range src_range);
5452
5453 static inline source_range
5454 get_decl_source_range (tree decl)
5455 {
5456 location_t loc = DECL_SOURCE_LOCATION (decl);
5457 return get_range_from_loc (line_table, loc);
5458 }
5459 5834
5460 /* Return true if it makes sense to promote/demote from_type to to_type. */ 5835 /* Return true if it makes sense to promote/demote from_type to to_type. */
5461 inline bool 5836 inline bool
5462 desired_pro_or_demotion_p (const_tree to_type, const_tree from_type) 5837 desired_pro_or_demotion_p (const_tree to_type, const_tree from_type)
5463 { 5838 {
5484 /* Return true if type T has the same precision as its underlying mode. */ 5859 /* Return true if type T has the same precision as its underlying mode. */
5485 5860
5486 inline bool 5861 inline bool
5487 type_has_mode_precision_p (const_tree t) 5862 type_has_mode_precision_p (const_tree t)
5488 { 5863 {
5489 return TYPE_PRECISION (t) == GET_MODE_PRECISION (TYPE_MODE (t)); 5864 return known_eq (TYPE_PRECISION (t), GET_MODE_PRECISION (TYPE_MODE (t)));
5865 }
5866
5867 /* Return true if a FUNCTION_DECL NODE is a GCC built-in function.
5868
5869 Note that it is different from the DECL_IS_BUILTIN accessor. For
5870 instance, user declared prototypes of C library functions are not
5871 DECL_IS_BUILTIN but may be DECL_BUILT_IN. */
5872
5873 inline bool
5874 fndecl_built_in_p (const_tree node)
5875 {
5876 return (DECL_BUILT_IN_CLASS (node) != NOT_BUILT_IN);
5877 }
5878
5879 /* Return true if a FUNCTION_DECL NODE is a GCC built-in function
5880 of class KLASS. */
5881
5882 inline bool
5883 fndecl_built_in_p (const_tree node, built_in_class klass)
5884 {
5885 return (fndecl_built_in_p (node) && DECL_BUILT_IN_CLASS (node) == klass);
5886 }
5887
5888 /* Return true if a FUNCTION_DECL NODE is a GCC built-in function
5889 of class KLASS with name equal to NAME. */
5890
5891 inline bool
5892 fndecl_built_in_p (const_tree node, int name, built_in_class klass)
5893 {
5894 return (fndecl_built_in_p (node, klass) && DECL_FUNCTION_CODE (node) == name);
5895 }
5896
5897 /* Return true if a FUNCTION_DECL NODE is a GCC built-in function
5898 of BUILT_IN_NORMAL class with name equal to NAME. */
5899
5900 inline bool
5901 fndecl_built_in_p (const_tree node, built_in_function name)
5902 {
5903 return (fndecl_built_in_p (node, BUILT_IN_NORMAL)
5904 && DECL_FUNCTION_CODE (node) == name);
5490 } 5905 }
5491 5906
5492 #endif /* GCC_TREE_H */ 5907 #endif /* GCC_TREE_H */