comparison gcc/tree.h @ 57:326d9e06c2e3

modify c-parser.c
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 15 Feb 2010 00:54:17 +0900
parents 9de9dad105d4 77e2b8dfacca
children 1b10fe6932e1
comparison
equal deleted inserted replaced
54:f62c169bbc24 57:326d9e06c2e3
103 /* Nonzero if CODE represents a declaration. */ 103 /* Nonzero if CODE represents a declaration. */
104 104
105 #define DECL_P(CODE)\ 105 #define DECL_P(CODE)\
106 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_declaration) 106 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_declaration)
107 107
108 /* Nonzero if CODE represents a memory tag. */
109
110 #define MTAG_P(CODE) \
111 (TREE_CODE (CODE) == NAME_MEMORY_TAG \
112 || TREE_CODE (CODE) == SYMBOL_MEMORY_TAG \
113 || TREE_CODE (CODE) == MEMORY_PARTITION_TAG)
114
115
116 /* Nonzero if DECL represents a VAR_DECL or FUNCTION_DECL. */ 108 /* Nonzero if DECL represents a VAR_DECL or FUNCTION_DECL. */
117 109
118 #define VAR_OR_FUNCTION_DECL_P(DECL)\ 110 #define VAR_OR_FUNCTION_DECL_P(DECL)\
119 (TREE_CODE (DECL) == VAR_DECL || TREE_CODE (DECL) == FUNCTION_DECL) 111 (TREE_CODE (DECL) == VAR_DECL || TREE_CODE (DECL) == FUNCTION_DECL)
120 112
188 180
189 /* A vectors of trees. */ 181 /* A vectors of trees. */
190 DEF_VEC_P(tree); 182 DEF_VEC_P(tree);
191 DEF_VEC_ALLOC_P(tree,gc); 183 DEF_VEC_ALLOC_P(tree,gc);
192 DEF_VEC_ALLOC_P(tree,heap); 184 DEF_VEC_ALLOC_P(tree,heap);
185
186 /* We have to be able to tell cgraph about the needed-ness of the target
187 of an alias. This requires that the decl have been defined. Aliases
188 that precede their definition have to be queued for later processing. */
189
190 typedef struct GTY(()) alias_pair
191 {
192 tree decl;
193 tree target;
194 } alias_pair;
195
196 /* Define gc'd vector type. */
197 DEF_VEC_O(alias_pair);
198 DEF_VEC_ALLOC_O(alias_pair,gc);
199
200 extern GTY(()) VEC(alias_pair,gc) * alias_pairs;
193 201
194 202
195 /* Classify which part of the compiler has defined a given builtin function. 203 /* Classify which part of the compiler has defined a given builtin function.
196 Note that we assume below that this is no more than two bits. */ 204 Note that we assume below that this is no more than two bits. */
197 enum built_in_class 205 enum built_in_class
346 /* Every kind of tree node starts with this structure, 354 /* Every kind of tree node starts with this structure,
347 so all nodes have these fields. 355 so all nodes have these fields.
348 356
349 See the accessor macros, defined below, for documentation of the 357 See the accessor macros, defined below, for documentation of the
350 fields. */ 358 fields. */
351 union tree_ann_d; 359
352 360 struct GTY(()) tree_base {
353 struct tree_base GTY(())
354 {
355 ENUM_BITFIELD(tree_code) code : 16; 361 ENUM_BITFIELD(tree_code) code : 16;
356 362
357 unsigned side_effects_flag : 1; 363 unsigned side_effects_flag : 1;
358 unsigned constant_flag : 1; 364 unsigned constant_flag : 1;
359 unsigned addressable_flag : 1; 365 unsigned addressable_flag : 1;
369 unsigned public_flag : 1; 375 unsigned public_flag : 1;
370 unsigned private_flag : 1; 376 unsigned private_flag : 1;
371 unsigned protected_flag : 1; 377 unsigned protected_flag : 1;
372 unsigned deprecated_flag : 1; 378 unsigned deprecated_flag : 1;
373 unsigned saturating_flag : 1; 379 unsigned saturating_flag : 1;
380
374 unsigned default_def_flag : 1; 381 unsigned default_def_flag : 1;
375
376 unsigned lang_flag_0 : 1; 382 unsigned lang_flag_0 : 1;
377 unsigned lang_flag_1 : 1; 383 unsigned lang_flag_1 : 1;
378 unsigned lang_flag_2 : 1; 384 unsigned lang_flag_2 : 1;
379 unsigned lang_flag_3 : 1; 385 unsigned lang_flag_3 : 1;
380 unsigned lang_flag_4 : 1; 386 unsigned lang_flag_4 : 1;
381 unsigned lang_flag_5 : 1; 387 unsigned lang_flag_5 : 1;
382 unsigned lang_flag_6 : 1; 388 unsigned lang_flag_6 : 1;
389
383 unsigned visited : 1; 390 unsigned visited : 1;
384 391 unsigned packed_flag : 1;
385 unsigned spare : 23; 392 unsigned user_align : 1;
386 393
387 union tree_ann_d *ann; 394 unsigned spare : 13;
388 }; 395
389 396 /* This field is only used with type nodes; the only reason it is present
390 struct tree_common GTY(()) 397 in tree_base instead of tree_type is to save space. The size of the
391 { 398 field must be large enough to hold addr_space_t values. */
399 unsigned address_space : 8;
400 };
401
402 struct GTY(()) tree_common {
392 struct tree_base base; 403 struct tree_base base;
393 tree chain; 404 tree chain;
394 tree type; 405 tree type;
395 }; 406 };
396 407
433 TRY_CATCH_EXPR 444 TRY_CATCH_EXPR
434 445
435 ASM_INPUT_P in 446 ASM_INPUT_P in
436 ASM_EXPR 447 ASM_EXPR
437 448
438 EH_FILTER_MUST_NOT_THROW in
439 EH_FILTER_EXPR
440
441 TYPE_REF_CAN_ALIAS_ALL in 449 TYPE_REF_CAN_ALIAS_ALL in
442 POINTER_TYPE, REFERENCE_TYPE 450 POINTER_TYPE, REFERENCE_TYPE
443 451
444 MOVE_NONTEMPORAL in 452 MOVE_NONTEMPORAL in
445 MODIFY_EXPR 453 MODIFY_EXPR
482 TREE_PRIVATE in 490 TREE_PRIVATE in
483 all decls 491 all decls
484 492
485 CALL_EXPR_RETURN_SLOT_OPT in 493 CALL_EXPR_RETURN_SLOT_OPT in
486 CALL_EXPR 494 CALL_EXPR
487
488 DECL_BY_REFERENCE in
489 PARM_DECL, RESULT_DECL
490 495
491 OMP_SECTION_LAST in 496 OMP_SECTION_LAST in
492 OMP_SECTION 497 OMP_SECTION
493 498
494 OMP_PARALLEL_COMBINED in 499 OMP_PARALLEL_COMBINED in
585 590
586 deprecated_flag: 591 deprecated_flag:
587 592
588 TREE_DEPRECATED in 593 TREE_DEPRECATED in
589 all decls 594 all decls
595 all types
590 596
591 IDENTIFIER_TRANSPARENT_ALIAS in 597 IDENTIFIER_TRANSPARENT_ALIAS in
592 IDENTIFIER_NODE 598 IDENTIFIER_NODE
593 599
594 STMT_IN_SSA_EDGE_WORKLIST in 600 STMT_IN_SSA_EDGE_WORKLIST in
609 TREE_NO_WARNING in 615 TREE_NO_WARNING in
610 all expressions 616 all expressions
611 all decls 617 all decls
612 618
613 default_def_flag: 619 default_def_flag:
620
621 TYPE_VECTOR_OPAQUE in
622 VECTOR_TYPE
614 623
615 SSA_NAME_IS_DEFAULT_DEF in 624 SSA_NAME_IS_DEFAULT_DEF in
616 SSA_NAME 625 SSA_NAME
617 */ 626 */
618 627
931 940
932 #include "tree-check.h" 941 #include "tree-check.h"
933 942
934 #define TYPE_CHECK(T) TREE_CLASS_CHECK (T, tcc_type) 943 #define TYPE_CHECK(T) TREE_CLASS_CHECK (T, tcc_type)
935 #define DECL_MINIMAL_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_MINIMAL) 944 #define DECL_MINIMAL_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_MINIMAL)
936 #define TREE_MEMORY_TAG_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_MEMORY_TAG)
937 #define DECL_COMMON_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_COMMON) 945 #define DECL_COMMON_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_COMMON)
938 #define DECL_WRTL_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_WRTL) 946 #define DECL_WRTL_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_WRTL)
939 #define DECL_WITH_VIS_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_WITH_VIS) 947 #define DECL_WITH_VIS_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_WITH_VIS)
940 #define DECL_NON_COMMON_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_NON_COMMON) 948 #define DECL_NON_COMMON_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_NON_COMMON)
941 #define CST_CHECK(T) TREE_CLASS_CHECK (T, tcc_constant) 949 #define CST_CHECK(T) TREE_CLASS_CHECK (T, tcc_constant)
972 980
973 #define CASE_CONVERT \ 981 #define CASE_CONVERT \
974 case NOP_EXPR: \ 982 case NOP_EXPR: \
975 case CONVERT_EXPR 983 case CONVERT_EXPR
976 984
977 /* Given an expression as a tree, strip any NON_LVALUE_EXPRs and NOP_EXPRs 985 /* Given an expression as a tree, strip any conversion that generates
978 that don't change the machine mode. */ 986 no instruction. Accepts both tree and const_tree arguments since
979 987 we are not modifying the tree itself. */
980 #define STRIP_NOPS(EXP) \ 988
981 while ((CONVERT_EXPR_P (EXP) \ 989 #define STRIP_NOPS(EXP) \
982 || TREE_CODE (EXP) == NON_LVALUE_EXPR) \ 990 (EXP) = tree_strip_nop_conversions (CONST_CAST_TREE (EXP))
983 && TREE_OPERAND (EXP, 0) != error_mark_node \
984 && (TYPE_MODE (TREE_TYPE (EXP)) \
985 == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
986 (EXP) = TREE_OPERAND (EXP, 0)
987 991
988 /* Like STRIP_NOPS, but don't let the signedness change either. */ 992 /* Like STRIP_NOPS, but don't let the signedness change either. */
989 993
990 #define STRIP_SIGN_NOPS(EXP) \ 994 #define STRIP_SIGN_NOPS(EXP) \
991 while ((CONVERT_EXPR_P (EXP) \ 995 (EXP) = tree_strip_sign_nop_conversions (CONST_CAST_TREE (EXP))
992 || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
993 && TREE_OPERAND (EXP, 0) != error_mark_node \
994 && (TYPE_MODE (TREE_TYPE (EXP)) \
995 == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0)))) \
996 && (TYPE_UNSIGNED (TREE_TYPE (EXP)) \
997 == TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (EXP, 0)))) \
998 && (POINTER_TYPE_P (TREE_TYPE (EXP)) \
999 == POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
1000 (EXP) = TREE_OPERAND (EXP, 0)
1001 996
1002 /* Like STRIP_NOPS, but don't alter the TREE_TYPE either. */ 997 /* Like STRIP_NOPS, but don't alter the TREE_TYPE either. */
1003 998
1004 #define STRIP_TYPE_NOPS(EXP) \ 999 #define STRIP_TYPE_NOPS(EXP) \
1005 while ((CONVERT_EXPR_P (EXP) \ 1000 while ((CONVERT_EXPR_P (EXP) \
1010 (EXP) = TREE_OPERAND (EXP, 0) 1005 (EXP) = TREE_OPERAND (EXP, 0)
1011 1006
1012 /* Remove unnecessary type conversions according to 1007 /* Remove unnecessary type conversions according to
1013 tree_ssa_useless_type_conversion. */ 1008 tree_ssa_useless_type_conversion. */
1014 1009
1015 #define STRIP_USELESS_TYPE_CONVERSION(EXP) \ 1010 #define STRIP_USELESS_TYPE_CONVERSION(EXP) \
1016 while (tree_ssa_useless_type_conversion (EXP)) \ 1011 (EXP) = tree_ssa_strip_useless_type_conversions (EXP)
1017 EXP = TREE_OPERAND (EXP, 0)
1018 1012
1019 /* Nonzero if TYPE represents an integral type. Note that we do not 1013 /* Nonzero if TYPE represents an integral type. Note that we do not
1020 include COMPLEX types here. Keep these checks in ascending code 1014 include COMPLEX types here. Keep these checks in ascending code
1021 order. */ 1015 order. */
1022 1016
1068 /* Nonzero if TYPE represents a decimal floating-point type. */ 1062 /* Nonzero if TYPE represents a decimal floating-point type. */
1069 #define DECIMAL_FLOAT_TYPE_P(TYPE) \ 1063 #define DECIMAL_FLOAT_TYPE_P(TYPE) \
1070 (SCALAR_FLOAT_TYPE_P (TYPE) \ 1064 (SCALAR_FLOAT_TYPE_P (TYPE) \
1071 && DECIMAL_FLOAT_MODE_P (TYPE_MODE (TYPE))) 1065 && DECIMAL_FLOAT_MODE_P (TYPE_MODE (TYPE)))
1072 1066
1067 /* Nonzero if TYPE is a record or union type. */
1068 #define RECORD_OR_UNION_TYPE_P(TYPE) \
1069 (TREE_CODE (TYPE) == RECORD_TYPE \
1070 || TREE_CODE (TYPE) == UNION_TYPE \
1071 || TREE_CODE (TYPE) == QUAL_UNION_TYPE)
1072
1073 /* Nonzero if TYPE represents an aggregate (multi-component) type. 1073 /* Nonzero if TYPE represents an aggregate (multi-component) type.
1074 Keep these checks in ascending code order. */ 1074 Keep these checks in ascending code order. */
1075 1075
1076 #define AGGREGATE_TYPE_P(TYPE) \ 1076 #define AGGREGATE_TYPE_P(TYPE) \
1077 (TREE_CODE (TYPE) == ARRAY_TYPE || TREE_CODE (TYPE) == RECORD_TYPE \ 1077 (TREE_CODE (TYPE) == ARRAY_TYPE || RECORD_OR_UNION_TYPE_P (TYPE))
1078 || TREE_CODE (TYPE) == UNION_TYPE || TREE_CODE (TYPE) == QUAL_UNION_TYPE)
1079 1078
1080 /* Nonzero if TYPE represents a pointer or reference type. 1079 /* Nonzero if TYPE represents a pointer or reference type.
1081 (It should be renamed to INDIRECT_TYPE_P.) Keep these checks in 1080 (It should be renamed to INDIRECT_TYPE_P.) Keep these checks in
1082 ascending code order. */ 1081 ascending code order. */
1083 1082
1128 CASE_LOW operand has been processed. */ 1127 CASE_LOW operand has been processed. */
1129 #define CASE_LOW_SEEN(NODE) \ 1128 #define CASE_LOW_SEEN(NODE) \
1130 (CASE_LABEL_EXPR_CHECK (NODE)->base.addressable_flag) 1129 (CASE_LABEL_EXPR_CHECK (NODE)->base.addressable_flag)
1131 1130
1132 #define PREDICT_EXPR_OUTCOME(NODE) \ 1131 #define PREDICT_EXPR_OUTCOME(NODE) \
1133 (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag) 1132 ((enum prediction) (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag))
1133 #define SET_PREDICT_EXPR_OUTCOME(NODE, OUTCOME) \
1134 (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag = (int) OUTCOME)
1134 #define PREDICT_EXPR_PREDICTOR(NODE) \ 1135 #define PREDICT_EXPR_PREDICTOR(NODE) \
1135 ((enum br_predictor)tree_low_cst (TREE_OPERAND (PREDICT_EXPR_CHECK (NODE), 0), 0)) 1136 ((enum br_predictor)tree_low_cst (TREE_OPERAND (PREDICT_EXPR_CHECK (NODE), 0), 0))
1136 1137
1137 /* In a VAR_DECL, nonzero means allocate static storage. 1138 /* In a VAR_DECL, nonzero means allocate static storage.
1138 In a FUNCTION_DECL, nonzero if function has been defined. 1139 In a FUNCTION_DECL, nonzero if function has been defined.
1183 1184
1184 /* In an INTEGER_CST, REAL_CST, COMPLEX_CST, or VECTOR_CST, this means 1185 /* In an INTEGER_CST, REAL_CST, COMPLEX_CST, or VECTOR_CST, this means
1185 there was an overflow in folding. */ 1186 there was an overflow in folding. */
1186 1187
1187 #define TREE_OVERFLOW(NODE) (CST_CHECK (NODE)->base.public_flag) 1188 #define TREE_OVERFLOW(NODE) (CST_CHECK (NODE)->base.public_flag)
1188
1189 /* ??? This is an obsolete synonym for TREE_OVERFLOW. */
1190 #define TREE_CONSTANT_OVERFLOW(NODE) TREE_OVERFLOW(NODE)
1191 1189
1192 /* TREE_OVERFLOW can only be true for EXPR of CONSTANT_CLASS_P. */ 1190 /* TREE_OVERFLOW can only be true for EXPR of CONSTANT_CLASS_P. */
1193 1191
1194 #define TREE_OVERFLOW_P(EXPR) \ 1192 #define TREE_OVERFLOW_P(EXPR) \
1195 (CONSTANT_CLASS_P (EXPR) && TREE_OVERFLOW (EXPR)) 1193 (CONSTANT_CLASS_P (EXPR) && TREE_OVERFLOW (EXPR))
1254 I.e. that the access will not trap, provided that the access to 1252 I.e. that the access will not trap, provided that the access to
1255 the base to the array will not trap. */ 1253 the base to the array will not trap. */
1256 #define TREE_THIS_NOTRAP(NODE) ((NODE)->base.nothrow_flag) 1254 #define TREE_THIS_NOTRAP(NODE) ((NODE)->base.nothrow_flag)
1257 1255
1258 /* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node, 1256 /* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node,
1259 nonzero means it may not be the lhs of an assignment. 1257 nonzero means it may not be the lhs of an assignment.
1260 Nonzero in a FUNCTION_DECL means this function should be treated 1258 Nonzero in a FUNCTION_DECL means this function should be treated
1261 as "const" function (can only read its arguments). */ 1259 as "const" function (can only read its arguments). */
1262 #define TREE_READONLY(NODE) (NON_TYPE_CHECK (NODE)->base.readonly_flag) 1260 #define TREE_READONLY(NODE) (NON_TYPE_CHECK (NODE)->base.readonly_flag)
1263 1261
1264 /* Value of expression is constant. Always on in all ..._CST nodes. May 1262 /* Value of expression is constant. Always on in all ..._CST nodes. May
1279 /* Nonzero in a VAR_DECL or STRING_CST means assembler code has been written. 1277 /* Nonzero in a VAR_DECL or STRING_CST means assembler code has been written.
1280 Nonzero in a FUNCTION_DECL means that the function has been compiled. 1278 Nonzero in a FUNCTION_DECL means that the function has been compiled.
1281 This is interesting in an inline function, since it might not need 1279 This is interesting in an inline function, since it might not need
1282 to be compiled separately. 1280 to be compiled separately.
1283 Nonzero in a RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE or ENUMERAL_TYPE 1281 Nonzero in a RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE or ENUMERAL_TYPE
1284 if the sdb debugging info for the type has been written. 1282 if the debugging info for the type has been written.
1285 In a BLOCK node, nonzero if reorder_blocks has already seen this block. 1283 In a BLOCK node, nonzero if reorder_blocks has already seen this block.
1286 In an SSA_NAME node, nonzero if the SSA_NAME occurs in an abnormal 1284 In an SSA_NAME node, nonzero if the SSA_NAME occurs in an abnormal
1287 PHI node. */ 1285 PHI node. */
1288 #define TREE_ASM_WRITTEN(NODE) ((NODE)->base.asm_written_flag) 1286 #define TREE_ASM_WRITTEN(NODE) ((NODE)->base.asm_written_flag)
1289 1287
1301 /* In a CALL_EXPR, means that it's safe to use the target of the call 1299 /* In a CALL_EXPR, means that it's safe to use the target of the call
1302 expansion as the return slot for a call that returns in memory. */ 1300 expansion as the return slot for a call that returns in memory. */
1303 #define CALL_EXPR_RETURN_SLOT_OPT(NODE) \ 1301 #define CALL_EXPR_RETURN_SLOT_OPT(NODE) \
1304 (CALL_EXPR_CHECK (NODE)->base.private_flag) 1302 (CALL_EXPR_CHECK (NODE)->base.private_flag)
1305 1303
1306 /* In a RESULT_DECL or PARM_DECL, means that it is passed by invisible 1304 /* In a RESULT_DECL, PARM_DECL and VAR_DECL, means that it is
1307 reference (and the TREE_TYPE is a pointer to the true type). */ 1305 passed by invisible reference (and the TREE_TYPE is a pointer to the true
1308 #define DECL_BY_REFERENCE(NODE) (DECL_COMMON_CHECK (NODE)->base.private_flag) 1306 type). */
1307 #define DECL_BY_REFERENCE(NODE) \
1308 (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \
1309 RESULT_DECL)->decl_common.decl_by_reference_flag)
1310
1311 /* In a RESULT_DECL, PARM_DECL and VAR_DECL, means that this decl
1312 can be used as restricted tag to disambiguate against other restrict
1313 pointers. Used by fortran to capture something like non-addressability
1314 (which it isn't really because the middle-end does take addresses of
1315 such variables). */
1316 #define DECL_RESTRICTED_P(NODE) \
1317 (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \
1318 RESULT_DECL)->decl_common.decl_restricted_flag)
1309 1319
1310 /* In a CALL_EXPR, means that the call is the jump from a thunk to the 1320 /* In a CALL_EXPR, means that the call is the jump from a thunk to the
1311 thunked-to function. */ 1321 thunked-to function. */
1312 #define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag) 1322 #define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag)
1313 1323
1369 < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ 1379 < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
1370 || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ 1380 || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
1371 == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ 1381 == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
1372 && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B))) 1382 && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B)))
1373 1383
1374 struct tree_int_cst GTY(()) 1384 struct GTY(()) tree_int_cst {
1375 {
1376 struct tree_common common; 1385 struct tree_common common;
1377 double_int int_cst; 1386 double_int int_cst;
1378 }; 1387 };
1379 1388
1380 /* In a REAL_CST node. struct real_value is an opaque entity, with 1389 /* In a REAL_CST node. struct real_value is an opaque entity, with
1383 struct real_value; 1392 struct real_value;
1384 1393
1385 #define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr) 1394 #define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr)
1386 #define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE)) 1395 #define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE))
1387 1396
1388 struct tree_real_cst GTY(()) 1397 struct GTY(()) tree_real_cst {
1389 {
1390 struct tree_common common; 1398 struct tree_common common;
1391 struct real_value * real_cst_ptr; 1399 struct real_value * real_cst_ptr;
1392 }; 1400 };
1393 1401
1394 /* In a FIXED_CST node. */ 1402 /* In a FIXED_CST node. */
1395 struct fixed_value; 1403 struct fixed_value;
1396 1404
1397 #define TREE_FIXED_CST_PTR(NODE) (FIXED_CST_CHECK (NODE)->fixed_cst.fixed_cst_ptr) 1405 #define TREE_FIXED_CST_PTR(NODE) (FIXED_CST_CHECK (NODE)->fixed_cst.fixed_cst_ptr)
1398 #define TREE_FIXED_CST(NODE) (*TREE_FIXED_CST_PTR (NODE)) 1406 #define TREE_FIXED_CST(NODE) (*TREE_FIXED_CST_PTR (NODE))
1399 1407
1400 struct tree_fixed_cst GTY(()) 1408 struct GTY(()) tree_fixed_cst {
1401 {
1402 struct tree_common common; 1409 struct tree_common common;
1403 struct fixed_value * fixed_cst_ptr; 1410 struct fixed_value * fixed_cst_ptr;
1404 }; 1411 };
1405 1412
1406 /* In a STRING_CST */ 1413 /* In a STRING_CST */
1407 #define TREE_STRING_LENGTH(NODE) (STRING_CST_CHECK (NODE)->string.length) 1414 #define TREE_STRING_LENGTH(NODE) (STRING_CST_CHECK (NODE)->string.length)
1408 #define TREE_STRING_POINTER(NODE) \ 1415 #define TREE_STRING_POINTER(NODE) \
1409 ((const char *)(STRING_CST_CHECK (NODE)->string.str)) 1416 ((const char *)(STRING_CST_CHECK (NODE)->string.str))
1410 1417
1411 struct tree_string GTY(()) 1418 struct GTY(()) tree_string {
1412 {
1413 struct tree_common common; 1419 struct tree_common common;
1414 int length; 1420 int length;
1415 char str[1]; 1421 char str[1];
1416 }; 1422 };
1417 1423
1418 /* In a COMPLEX_CST node. */ 1424 /* In a COMPLEX_CST node. */
1419 #define TREE_REALPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.real) 1425 #define TREE_REALPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.real)
1420 #define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag) 1426 #define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag)
1421 1427
1422 struct tree_complex GTY(()) 1428 struct GTY(()) tree_complex {
1423 {
1424 struct tree_common common; 1429 struct tree_common common;
1425 tree real; 1430 tree real;
1426 tree imag; 1431 tree imag;
1427 }; 1432 };
1428 1433
1429 /* In a VECTOR_CST node. */ 1434 /* In a VECTOR_CST node. */
1430 #define TREE_VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elements) 1435 #define TREE_VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elements)
1431 1436
1432 struct tree_vector GTY(()) 1437 struct GTY(()) tree_vector {
1433 {
1434 struct tree_common common; 1438 struct tree_common common;
1435 tree elements; 1439 tree elements;
1436 }; 1440 };
1437 1441
1438 #include "symtab.h" 1442 #include "symtab.h"
1451 1455
1452 #define HT_IDENT_TO_GCC_IDENT(NODE) \ 1456 #define HT_IDENT_TO_GCC_IDENT(NODE) \
1453 ((tree) ((char *) (NODE) - sizeof (struct tree_common))) 1457 ((tree) ((char *) (NODE) - sizeof (struct tree_common)))
1454 #define GCC_IDENT_TO_HT_IDENT(NODE) (&((struct tree_identifier *) (NODE))->id) 1458 #define GCC_IDENT_TO_HT_IDENT(NODE) (&((struct tree_identifier *) (NODE))->id)
1455 1459
1456 struct tree_identifier GTY(()) 1460 struct GTY(()) tree_identifier {
1457 {
1458 struct tree_common common; 1461 struct tree_common common;
1459 struct ht_identifier id; 1462 struct ht_identifier id;
1460 }; 1463 };
1461 1464
1462 /* In a TREE_LIST node. */ 1465 /* In a TREE_LIST node. */
1463 #define TREE_PURPOSE(NODE) (TREE_LIST_CHECK (NODE)->list.purpose) 1466 #define TREE_PURPOSE(NODE) (TREE_LIST_CHECK (NODE)->list.purpose)
1464 #define TREE_VALUE(NODE) (TREE_LIST_CHECK (NODE)->list.value) 1467 #define TREE_VALUE(NODE) (TREE_LIST_CHECK (NODE)->list.value)
1465 1468
1466 struct tree_list GTY(()) 1469 struct GTY(()) tree_list {
1467 {
1468 struct tree_common common; 1470 struct tree_common common;
1469 tree purpose; 1471 tree purpose;
1470 tree value; 1472 tree value;
1471 }; 1473 };
1472 1474
1475 #define TREE_VEC_END(NODE) \ 1477 #define TREE_VEC_END(NODE) \
1476 ((void) TREE_VEC_CHECK (NODE), &((NODE)->vec.a[(NODE)->vec.length])) 1478 ((void) TREE_VEC_CHECK (NODE), &((NODE)->vec.a[(NODE)->vec.length]))
1477 1479
1478 #define TREE_VEC_ELT(NODE,I) TREE_VEC_ELT_CHECK (NODE, I) 1480 #define TREE_VEC_ELT(NODE,I) TREE_VEC_ELT_CHECK (NODE, I)
1479 1481
1480 struct tree_vec GTY(()) 1482 struct GTY(()) tree_vec {
1481 {
1482 struct tree_common common; 1483 struct tree_common common;
1483 int length; 1484 int length;
1484 tree GTY ((length ("TREE_VEC_LENGTH ((tree)&%h)"))) a[1]; 1485 tree GTY ((length ("TREE_VEC_LENGTH ((tree)&%h)"))) a[1];
1485 }; 1486 };
1486 1487
1517 constructor_elt *_ce___ = VEC_safe_push (constructor_elt, gc, V, NULL); \ 1518 constructor_elt *_ce___ = VEC_safe_push (constructor_elt, gc, V, NULL); \
1518 _ce___->index = INDEX; \ 1519 _ce___->index = INDEX; \
1519 _ce___->value = VALUE; \ 1520 _ce___->value = VALUE; \
1520 } while (0) 1521 } while (0)
1521 1522
1523 /* True if NODE, a FIELD_DECL, is to be processed as a bitfield for
1524 constructor output purposes. */
1525 #define CONSTRUCTOR_BITFIELD_P(NODE) \
1526 (DECL_BIT_FIELD (FIELD_DECL_CHECK (NODE)) && DECL_MODE (NODE) != BLKmode)
1527
1522 /* A single element of a CONSTRUCTOR. VALUE holds the actual value of the 1528 /* A single element of a CONSTRUCTOR. VALUE holds the actual value of the
1523 element. INDEX can optionally design the position of VALUE: in arrays, 1529 element. INDEX can optionally design the position of VALUE: in arrays,
1524 it is the index where VALUE has to be placed; in structures, it is the 1530 it is the index where VALUE has to be placed; in structures, it is the
1525 FIELD_DECL of the member. */ 1531 FIELD_DECL of the member. */
1526 typedef struct constructor_elt_d GTY(()) 1532 typedef struct GTY(()) constructor_elt_d {
1527 {
1528 tree index; 1533 tree index;
1529 tree value; 1534 tree value;
1530 } constructor_elt; 1535 } constructor_elt;
1531 1536
1532 DEF_VEC_O(constructor_elt); 1537 DEF_VEC_O(constructor_elt);
1533 DEF_VEC_ALLOC_O(constructor_elt,gc); 1538 DEF_VEC_ALLOC_O(constructor_elt,gc);
1534 1539
1535 struct tree_constructor GTY(()) 1540 struct GTY(()) tree_constructor {
1536 {
1537 struct tree_common common; 1541 struct tree_common common;
1538 VEC(constructor_elt,gc) *elts; 1542 VEC(constructor_elt,gc) *elts;
1539 }; 1543 };
1540 1544
1541 /* Define fields and accessors for some nodes that represent expressions. */ 1545 /* Define fields and accessors for some nodes that represent expressions. */
1555 Note that we have to bypass the use of TREE_OPERAND to access 1559 Note that we have to bypass the use of TREE_OPERAND to access
1556 that field to avoid infinite recursion in expanding the macros. */ 1560 that field to avoid infinite recursion in expanding the macros. */
1557 #define VL_EXP_OPERAND_LENGTH(NODE) \ 1561 #define VL_EXP_OPERAND_LENGTH(NODE) \
1558 ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0])) 1562 ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0]))
1559 1563
1564 /* Nonzero if is_gimple_debug() may possibly hold. */
1565 #define MAY_HAVE_DEBUG_STMTS (flag_var_tracking_assignments)
1566
1560 /* In a LOOP_EXPR node. */ 1567 /* In a LOOP_EXPR node. */
1561 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0) 1568 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0)
1562 1569
1563 /* The source location of this expression. Non-tree_exp nodes such as 1570 /* The source location of this expression. Non-tree_exp nodes such as
1564 decls and constants can be shared among multiple locations, so 1571 decls and constants can be shared among multiple locations, so
1565 return nothing. */ 1572 return nothing. */
1566 #define EXPR_LOCATION(NODE) (EXPR_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION) 1573 #define EXPR_LOCATION(NODE) (EXPR_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION)
1567 #define SET_EXPR_LOCATION(NODE, LOCUS) EXPR_CHECK ((NODE))->exp.locus = (LOCUS) 1574 #define SET_EXPR_LOCATION(NODE, LOCUS) EXPR_CHECK ((NODE))->exp.locus = (LOCUS)
1568 #define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION) 1575 #define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION)
1569 #define EXPR_LOCUS(NODE) (EXPR_P (NODE) \
1570 ? CONST_CAST (source_location *, &(NODE)->exp.locus) \
1571 : (source_location *) NULL)
1572 #define SET_EXPR_LOCUS(NODE, FROM) set_expr_locus ((NODE), (FROM))
1573 #define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus) 1576 #define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus)
1574 #define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus) 1577 #define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus)
1575 1578
1576 /* True if a tree is an expression or statement that can have a 1579 /* True if a tree is an expression or statement that can have a
1577 location. */ 1580 location. */
1578 #define CAN_HAVE_LOCATION_P(NODE) (EXPR_P (NODE)) 1581 #define CAN_HAVE_LOCATION_P(NODE) ((NODE) && EXPR_P (NODE))
1579 1582
1580 extern void protected_set_expr_location (tree, location_t); 1583 extern void protected_set_expr_location (tree, location_t);
1581 1584
1582 /* In a TARGET_EXPR node. */ 1585 /* In a TARGET_EXPR node. */
1583 #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0) 1586 #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0)
1587 /* DECL_EXPR accessor. This gives access to the DECL associated with 1590 /* DECL_EXPR accessor. This gives access to the DECL associated with
1588 the given declaration statement. */ 1591 the given declaration statement. */
1589 #define DECL_EXPR_DECL(NODE) TREE_OPERAND (DECL_EXPR_CHECK (NODE), 0) 1592 #define DECL_EXPR_DECL(NODE) TREE_OPERAND (DECL_EXPR_CHECK (NODE), 0)
1590 1593
1591 #define EXIT_EXPR_COND(NODE) TREE_OPERAND (EXIT_EXPR_CHECK (NODE), 0) 1594 #define EXIT_EXPR_COND(NODE) TREE_OPERAND (EXIT_EXPR_CHECK (NODE), 0)
1595
1596 /* COMPOUND_LITERAL_EXPR accessors. */
1597 #define COMPOUND_LITERAL_EXPR_DECL_EXPR(NODE) \
1598 TREE_OPERAND (COMPOUND_LITERAL_EXPR_CHECK (NODE), 0)
1599 #define COMPOUND_LITERAL_EXPR_DECL(NODE) \
1600 DECL_EXPR_DECL (COMPOUND_LITERAL_EXPR_DECL_EXPR (NODE))
1592 1601
1593 /* SWITCH_EXPR accessors. These give access to the condition, body and 1602 /* SWITCH_EXPR accessors. These give access to the condition, body and
1594 original condition type (before any compiler conversions) 1603 original condition type (before any compiler conversions)
1595 of the switch statement, respectively. */ 1604 of the switch statement, respectively. */
1596 #define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 0) 1605 #define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 0)
1608 #define TMR_BASE(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 1)) 1617 #define TMR_BASE(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 1))
1609 #define TMR_INDEX(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 2)) 1618 #define TMR_INDEX(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 2))
1610 #define TMR_STEP(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 3)) 1619 #define TMR_STEP(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 3))
1611 #define TMR_OFFSET(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 4)) 1620 #define TMR_OFFSET(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 4))
1612 #define TMR_ORIGINAL(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 5)) 1621 #define TMR_ORIGINAL(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 5))
1613 #define TMR_TAG(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 6))
1614 1622
1615 /* The operands of a BIND_EXPR. */ 1623 /* The operands of a BIND_EXPR. */
1616 #define BIND_EXPR_VARS(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 0)) 1624 #define BIND_EXPR_VARS(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 0))
1617 #define BIND_EXPR_BODY(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 1)) 1625 #define BIND_EXPR_BODY(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 1))
1618 #define BIND_EXPR_BLOCK(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 2)) 1626 #define BIND_EXPR_BLOCK(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 2))
1627 statement. */ 1635 statement. */
1628 #define ASM_STRING(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 0) 1636 #define ASM_STRING(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 0)
1629 #define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 1) 1637 #define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 1)
1630 #define ASM_INPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 2) 1638 #define ASM_INPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 2)
1631 #define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 3) 1639 #define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 3)
1640 #define ASM_LABELS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 4)
1632 /* Nonzero if we want to create an ASM_INPUT instead of an 1641 /* Nonzero if we want to create an ASM_INPUT instead of an
1633 ASM_OPERAND with no operands. */ 1642 ASM_OPERAND with no operands. */
1634 #define ASM_INPUT_P(NODE) (ASM_EXPR_CHECK (NODE)->base.static_flag) 1643 #define ASM_INPUT_P(NODE) (ASM_EXPR_CHECK (NODE)->base.static_flag)
1635 #define ASM_VOLATILE_P(NODE) (ASM_EXPR_CHECK (NODE)->base.public_flag) 1644 #define ASM_VOLATILE_P(NODE) (ASM_EXPR_CHECK (NODE)->base.public_flag)
1636 1645
1657 #define CATCH_BODY(NODE) TREE_OPERAND (CATCH_EXPR_CHECK (NODE), 1) 1666 #define CATCH_BODY(NODE) TREE_OPERAND (CATCH_EXPR_CHECK (NODE), 1)
1658 1667
1659 /* EH_FILTER_EXPR accessors. */ 1668 /* EH_FILTER_EXPR accessors. */
1660 #define EH_FILTER_TYPES(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 0) 1669 #define EH_FILTER_TYPES(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 0)
1661 #define EH_FILTER_FAILURE(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 1) 1670 #define EH_FILTER_FAILURE(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 1)
1662 #define EH_FILTER_MUST_NOT_THROW(NODE) \
1663 (EH_FILTER_EXPR_CHECK (NODE)->base.static_flag)
1664
1665 /* CHANGE_DYNAMIC_TYPE_EXPR accessors. */
1666 #define CHANGE_DYNAMIC_TYPE_NEW_TYPE(NODE) \
1667 TREE_OPERAND (CHANGE_DYNAMIC_TYPE_EXPR_CHECK (NODE), 0)
1668 #define CHANGE_DYNAMIC_TYPE_LOCATION(NODE) \
1669 TREE_OPERAND (CHANGE_DYNAMIC_TYPE_EXPR_CHECK (NODE), 1)
1670 1671
1671 /* OBJ_TYPE_REF accessors. */ 1672 /* OBJ_TYPE_REF accessors. */
1672 #define OBJ_TYPE_REF_EXPR(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 0) 1673 #define OBJ_TYPE_REF_EXPR(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 0)
1673 #define OBJ_TYPE_REF_OBJECT(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 1) 1674 #define OBJ_TYPE_REF_OBJECT(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 1)
1674 #define OBJ_TYPE_REF_TOKEN(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 2) 1675 #define OBJ_TYPE_REF_TOKEN(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 2)
1736 #define OMP_CLAUSE_CHAIN(NODE) TREE_CHAIN (OMP_CLAUSE_CHECK (NODE)) 1737 #define OMP_CLAUSE_CHAIN(NODE) TREE_CHAIN (OMP_CLAUSE_CHECK (NODE))
1737 #define OMP_CLAUSE_DECL(NODE) \ 1738 #define OMP_CLAUSE_DECL(NODE) \
1738 OMP_CLAUSE_OPERAND (OMP_CLAUSE_RANGE_CHECK (OMP_CLAUSE_CHECK (NODE), \ 1739 OMP_CLAUSE_OPERAND (OMP_CLAUSE_RANGE_CHECK (OMP_CLAUSE_CHECK (NODE), \
1739 OMP_CLAUSE_PRIVATE, \ 1740 OMP_CLAUSE_PRIVATE, \
1740 OMP_CLAUSE_COPYPRIVATE), 0) 1741 OMP_CLAUSE_COPYPRIVATE), 0)
1742 #define OMP_CLAUSE_HAS_LOCATION(NODE) \
1743 ((OMP_CLAUSE_CHECK (NODE))->omp_clause.locus != UNKNOWN_LOCATION)
1744 #define OMP_CLAUSE_LOCATION(NODE) (OMP_CLAUSE_CHECK (NODE))->omp_clause.locus
1741 1745
1742 /* True on an OMP_SECTION statement that was the last lexical member. 1746 /* True on an OMP_SECTION statement that was the last lexical member.
1743 This status is meaningful in the implementation of lastprivate. */ 1747 This status is meaningful in the implementation of lastprivate. */
1744 #define OMP_SECTION_LAST(NODE) \ 1748 #define OMP_SECTION_LAST(NODE) \
1745 (OMP_SECTION_CHECK (NODE)->base.private_flag) 1749 (OMP_SECTION_CHECK (NODE)->base.private_flag)
1820 }; 1824 };
1821 1825
1822 #define OMP_CLAUSE_DEFAULT_KIND(NODE) \ 1826 #define OMP_CLAUSE_DEFAULT_KIND(NODE) \
1823 (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_DEFAULT)->omp_clause.subcode.default_kind) 1827 (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_DEFAULT)->omp_clause.subcode.default_kind)
1824 1828
1825 struct tree_exp GTY(()) 1829 struct GTY(()) tree_exp {
1826 {
1827 struct tree_common common; 1830 struct tree_common common;
1828 location_t locus; 1831 location_t locus;
1829 tree block; 1832 tree block;
1830 tree GTY ((special ("tree_exp"), 1833 tree GTY ((special ("tree_exp"),
1831 desc ("TREE_CODE ((tree) &%0)"))) 1834 desc ("TREE_CODE ((tree) &%0)")))
1867 1870
1868 /* Attributes for SSA_NAMEs for pointer-type variables. */ 1871 /* Attributes for SSA_NAMEs for pointer-type variables. */
1869 #define SSA_NAME_PTR_INFO(N) \ 1872 #define SSA_NAME_PTR_INFO(N) \
1870 SSA_NAME_CHECK (N)->ssa_name.ptr_info 1873 SSA_NAME_CHECK (N)->ssa_name.ptr_info
1871 1874
1872 /* Get the value of this SSA_NAME, if available. */
1873 #define SSA_NAME_VALUE(N) \
1874 SSA_NAME_CHECK (N)->ssa_name.value_handle
1875
1876 #ifndef _TREE_FLOW_H 1875 #ifndef _TREE_FLOW_H
1877 struct ptr_info_def; 1876 struct ptr_info_def;
1878 #endif 1877 #endif
1879 1878
1880 1879
1881 1880
1882 /* Immediate use linking structure. This structure is used for maintaining 1881 /* Immediate use linking structure. This structure is used for maintaining
1883 a doubly linked list of uses of an SSA_NAME. */ 1882 a doubly linked list of uses of an SSA_NAME. */
1884 typedef struct ssa_use_operand_d GTY(()) 1883 typedef struct GTY(()) ssa_use_operand_d {
1885 {
1886 struct ssa_use_operand_d* GTY((skip(""))) prev; 1884 struct ssa_use_operand_d* GTY((skip(""))) prev;
1887 struct ssa_use_operand_d* GTY((skip(""))) next; 1885 struct ssa_use_operand_d* GTY((skip(""))) next;
1888 /* Immediate uses for a given SSA name are maintained as a cyclic 1886 /* Immediate uses for a given SSA name are maintained as a cyclic
1889 list. To recognize the root of this list, the location field 1887 list. To recognize the root of this list, the location field
1890 needs to point to the original SSA name. Since statements and 1888 needs to point to the original SSA name. Since statements and
1895 } ssa_use_operand_t; 1893 } ssa_use_operand_t;
1896 1894
1897 /* Return the immediate_use information for an SSA_NAME. */ 1895 /* Return the immediate_use information for an SSA_NAME. */
1898 #define SSA_NAME_IMM_USE_NODE(NODE) SSA_NAME_CHECK (NODE)->ssa_name.imm_uses 1896 #define SSA_NAME_IMM_USE_NODE(NODE) SSA_NAME_CHECK (NODE)->ssa_name.imm_uses
1899 1897
1900 struct tree_ssa_name GTY(()) 1898 struct GTY(()) tree_ssa_name {
1901 {
1902 struct tree_common common; 1899 struct tree_common common;
1903 1900
1904 /* _DECL wrapped by this SSA name. */ 1901 /* _DECL wrapped by this SSA name. */
1905 tree var; 1902 tree var;
1906 1903
1911 unsigned int version; 1908 unsigned int version;
1912 1909
1913 /* Pointer attributes used for alias analysis. */ 1910 /* Pointer attributes used for alias analysis. */
1914 struct ptr_info_def *ptr_info; 1911 struct ptr_info_def *ptr_info;
1915 1912
1916 /* Value for SSA name used by various passes.
1917
1918 Right now only invariants are allowed to persist beyond a pass in
1919 this field; in the future we will allow VALUE_HANDLEs to persist
1920 as well. */
1921 tree value_handle;
1922
1923 /* Immediate uses list for this SSA_NAME. */ 1913 /* Immediate uses list for this SSA_NAME. */
1924 struct ssa_use_operand_d imm_uses; 1914 struct ssa_use_operand_d imm_uses;
1925 }; 1915 };
1926 1916
1927 struct phi_arg_d GTY(()) 1917 struct GTY(()) phi_arg_d {
1928 {
1929 /* imm_use MUST be the first element in struct because we do some 1918 /* imm_use MUST be the first element in struct because we do some
1930 pointer arithmetic with it. See phi_arg_index_from_use. */ 1919 pointer arithmetic with it. See phi_arg_index_from_use. */
1931 struct ssa_use_operand_d imm_use; 1920 struct ssa_use_operand_d imm_use;
1932 tree def; 1921 tree def;
1922 location_t locus;
1933 }; 1923 };
1934 1924
1935 1925
1936 #define OMP_CLAUSE_CODE(NODE) \ 1926 #define OMP_CLAUSE_CODE(NODE) \
1937 (OMP_CLAUSE_CHECK (NODE))->omp_clause.code 1927 (OMP_CLAUSE_CHECK (NODE))->omp_clause.code
1943 (OMP_CLAUSE_CHECK (NODE))->omp_clause.code 1933 (OMP_CLAUSE_CHECK (NODE))->omp_clause.code
1944 1934
1945 #define OMP_CLAUSE_OPERAND(NODE, I) \ 1935 #define OMP_CLAUSE_OPERAND(NODE, I) \
1946 OMP_CLAUSE_ELT_CHECK (NODE, I) 1936 OMP_CLAUSE_ELT_CHECK (NODE, I)
1947 1937
1948 struct tree_omp_clause GTY(()) 1938 struct GTY(()) tree_omp_clause {
1949 {
1950 struct tree_common common; 1939 struct tree_common common;
1940 location_t locus;
1951 enum omp_clause_code code; 1941 enum omp_clause_code code;
1952 union omp_clause_subcode { 1942 union omp_clause_subcode {
1953 enum omp_clause_default_kind default_kind; 1943 enum omp_clause_default_kind default_kind;
1954 enum omp_clause_schedule_kind schedule_kind; 1944 enum omp_clause_schedule_kind schedule_kind;
1955 enum tree_code reduction_code; 1945 enum tree_code reduction_code;
2013 from. This is only set in the top level block, which corresponds to the 2003 from. This is only set in the top level block, which corresponds to the
2014 inlined function scope. This is used in the debug output routines. */ 2004 inlined function scope. This is used in the debug output routines. */
2015 2005
2016 #define BLOCK_SOURCE_LOCATION(NODE) (BLOCK_CHECK (NODE)->block.locus) 2006 #define BLOCK_SOURCE_LOCATION(NODE) (BLOCK_CHECK (NODE)->block.locus)
2017 2007
2018 struct tree_block GTY(()) 2008 struct GTY(()) tree_block {
2019 {
2020 struct tree_common common; 2009 struct tree_common common;
2021 2010
2022 unsigned abstract_flag : 1; 2011 unsigned abstract_flag : 1;
2023 unsigned block_num : 31; 2012 unsigned block_num : 31;
2024 2013
2072 #define TYPE_SYMTAB_DIE(NODE) (TYPE_CHECK (NODE)->type.symtab.die) 2061 #define TYPE_SYMTAB_DIE(NODE) (TYPE_CHECK (NODE)->type.symtab.die)
2073 #define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->type.name) 2062 #define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->type.name)
2074 #define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type.next_variant) 2063 #define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type.next_variant)
2075 #define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type.main_variant) 2064 #define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type.main_variant)
2076 #define TYPE_CONTEXT(NODE) (TYPE_CHECK (NODE)->type.context) 2065 #define TYPE_CONTEXT(NODE) (TYPE_CHECK (NODE)->type.context)
2066 #define TYPE_MAXVAL(NODE) (TYPE_CHECK (NODE)->type.maxval)
2067 #define TYPE_MINVAL(NODE) (TYPE_CHECK (NODE)->type.minval)
2077 2068
2078 /* Vector types need to check target flags to determine type. */ 2069 /* Vector types need to check target flags to determine type. */
2079 extern enum machine_mode vector_type_mode (const_tree); 2070 extern enum machine_mode vector_type_mode (const_tree);
2080 #define TYPE_MODE(NODE) \ 2071 #define TYPE_MODE(NODE) \
2081 (TREE_CODE (TYPE_CHECK (NODE)) == VECTOR_TYPE \ 2072 (TREE_CODE (TYPE_CHECK (NODE)) == VECTOR_TYPE \
2084 (TYPE_CHECK (NODE)->type.mode = (MODE)) 2075 (TYPE_CHECK (NODE)->type.mode = (MODE))
2085 2076
2086 /* The "canonical" type for this type node, which can be used to 2077 /* The "canonical" type for this type node, which can be used to
2087 compare the type for equality with another type. If two types are 2078 compare the type for equality with another type. If two types are
2088 equal (based on the semantics of the language), then they will have 2079 equal (based on the semantics of the language), then they will have
2089 equivalent TYPE_CANONICAL entries. 2080 equivalent TYPE_CANONICAL entries.
2090 2081
2091 As a special case, if TYPE_CANONICAL is NULL_TREE, then it cannot 2082 As a special case, if TYPE_CANONICAL is NULL_TREE, then it cannot
2092 be used for comparison against other types. Instead, the type is 2083 be used for comparison against other types. Instead, the type is
2093 said to require structural equality checks, described in 2084 said to require structural equality checks, described in
2094 TYPE_STRUCTURAL_EQUALITY_P. */ 2085 TYPE_STRUCTURAL_EQUALITY_P. */
2138 The value is an int, measured in bits. */ 2129 The value is an int, measured in bits. */
2139 #define TYPE_ALIGN(NODE) (TYPE_CHECK (NODE)->type.align) 2130 #define TYPE_ALIGN(NODE) (TYPE_CHECK (NODE)->type.align)
2140 2131
2141 /* 1 if the alignment for this type was requested by "aligned" attribute, 2132 /* 1 if the alignment for this type was requested by "aligned" attribute,
2142 0 if it is the default for this type. */ 2133 0 if it is the default for this type. */
2143 #define TYPE_USER_ALIGN(NODE) (TYPE_CHECK (NODE)->type.user_align) 2134 #define TYPE_USER_ALIGN(NODE) (TYPE_CHECK (NODE)->common.base.user_align)
2144 2135
2145 /* The alignment for NODE, in bytes. */ 2136 /* The alignment for NODE, in bytes. */
2146 #define TYPE_ALIGN_UNIT(NODE) (TYPE_ALIGN (NODE) / BITS_PER_UNIT) 2137 #define TYPE_ALIGN_UNIT(NODE) (TYPE_ALIGN (NODE) / BITS_PER_UNIT)
2147 2138
2148 /* If your language allows you to declare types, and you want debug info 2139 /* If your language allows you to declare types, and you want debug info
2178 2169
2179 /* If nonzero, this type is `restrict'-qualified, in the C sense of 2170 /* If nonzero, this type is `restrict'-qualified, in the C sense of
2180 the term. */ 2171 the term. */
2181 #define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->type.restrict_flag) 2172 #define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->type.restrict_flag)
2182 2173
2174 /* The address space the type is in. */
2175 #define TYPE_ADDR_SPACE(NODE) (TYPE_CHECK (NODE)->base.address_space)
2176
2183 /* There is a TYPE_QUAL value for each type qualifier. They can be 2177 /* There is a TYPE_QUAL value for each type qualifier. They can be
2184 combined by bitwise-or to form the complete set of qualifiers for a 2178 combined by bitwise-or to form the complete set of qualifiers for a
2185 type. */ 2179 type. */
2186 2180
2187 #define TYPE_UNQUALIFIED 0x0 2181 #define TYPE_UNQUALIFIED 0x0
2188 #define TYPE_QUAL_CONST 0x1 2182 #define TYPE_QUAL_CONST 0x1
2189 #define TYPE_QUAL_VOLATILE 0x2 2183 #define TYPE_QUAL_VOLATILE 0x2
2190 #define TYPE_QUAL_RESTRICT 0x4 2184 #define TYPE_QUAL_RESTRICT 0x4
2191 2185
2186 /* Encode/decode the named memory support as part of the qualifier. If more
2187 than 8 qualifiers are added, these macros need to be adjusted. */
2188 #define ENCODE_QUAL_ADDR_SPACE(NUM) ((NUM & 0xFF) << 8)
2189 #define DECODE_QUAL_ADDR_SPACE(X) (((X) >> 8) & 0xFF)
2190
2191 /* Return all qualifiers except for the address space qualifiers. */
2192 #define CLEAR_QUAL_ADDR_SPACE(X) ((X) & ~0xFF00)
2193
2194 /* Only keep the address space out of the qualifiers and discard the other
2195 qualifiers. */
2196 #define KEEP_QUAL_ADDR_SPACE(X) ((X) & 0xFF00)
2197
2192 /* The set of type qualifiers for this type. */ 2198 /* The set of type qualifiers for this type. */
2193 #define TYPE_QUALS(NODE) \ 2199 #define TYPE_QUALS(NODE) \
2200 ((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \
2201 | (TYPE_VOLATILE (NODE) * TYPE_QUAL_VOLATILE) \
2202 | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT) \
2203 | (ENCODE_QUAL_ADDR_SPACE (TYPE_ADDR_SPACE (NODE))))
2204
2205 /* The same as TYPE_QUALS without the address space qualifications. */
2206 #define TYPE_QUALS_NO_ADDR_SPACE(NODE) \
2194 ((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \ 2207 ((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \
2195 | (TYPE_VOLATILE (NODE) * TYPE_QUAL_VOLATILE) \ 2208 | (TYPE_VOLATILE (NODE) * TYPE_QUAL_VOLATILE) \
2196 | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT)) 2209 | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT))
2197 2210
2198 /* These flags are available for each language front end to use internally. */ 2211 /* These flags are available for each language front end to use internally. */
2226 2239
2227 /* Set precision to n when we have 2^n sub-parts of the vector. */ 2240 /* Set precision to n when we have 2^n sub-parts of the vector. */
2228 #define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \ 2241 #define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \
2229 (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision = exact_log2 (X)) 2242 (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision = exact_log2 (X))
2230 2243
2244 /* Nonzero in a VECTOR_TYPE if the frontends should not emit warnings
2245 about missing conversions to other vector types of the same size. */
2246 #define TYPE_VECTOR_OPAQUE(NODE) \
2247 (VECTOR_TYPE_CHECK (NODE)->base.default_def_flag)
2248
2231 /* Indicates that objects of this type must be initialized by calling a 2249 /* Indicates that objects of this type must be initialized by calling a
2232 function when they are created. */ 2250 function when they are created. */
2233 #define TYPE_NEEDS_CONSTRUCTING(NODE) \ 2251 #define TYPE_NEEDS_CONSTRUCTING(NODE) \
2234 (TYPE_CHECK (NODE)->type.needs_constructing_flag) 2252 (TYPE_CHECK (NODE)->type.needs_constructing_flag)
2235 2253
2244 #define TYPE_NONALIASED_COMPONENT(NODE) \ 2262 #define TYPE_NONALIASED_COMPONENT(NODE) \
2245 (ARRAY_TYPE_CHECK (NODE)->type.transparent_union_flag) 2263 (ARRAY_TYPE_CHECK (NODE)->type.transparent_union_flag)
2246 2264
2247 /* Indicated that objects of this type should be laid out in as 2265 /* Indicated that objects of this type should be laid out in as
2248 compact a way as possible. */ 2266 compact a way as possible. */
2249 #define TYPE_PACKED(NODE) (TYPE_CHECK (NODE)->type.packed_flag) 2267 #define TYPE_PACKED(NODE) (TYPE_CHECK (NODE)->common.base.packed_flag)
2250 2268
2251 /* Used by type_contains_placeholder_p to avoid recomputation. 2269 /* Used by type_contains_placeholder_p to avoid recomputation.
2252 Values are: 0 (unknown), 1 (false), 2 (true). Never access 2270 Values are: 0 (unknown), 1 (false), 2 (true). Never access
2253 this field directly. */ 2271 this field directly. */
2254 #define TYPE_CONTAINS_PLACEHOLDER_INTERNAL(NODE) \ 2272 #define TYPE_CONTAINS_PLACEHOLDER_INTERNAL(NODE) \
2255 (TYPE_CHECK (NODE)->type.contains_placeholder_bits) 2273 (TYPE_CHECK (NODE)->type.contains_placeholder_bits)
2256 2274
2257 struct die_struct; 2275 struct die_struct;
2258 2276
2259 struct tree_type GTY(()) 2277 struct GTY(()) tree_type {
2260 {
2261 struct tree_common common; 2278 struct tree_common common;
2262 tree values; 2279 tree values;
2263 tree size; 2280 tree size;
2264 tree size_unit; 2281 tree size_unit;
2265 tree attributes; 2282 tree attributes;
2266 unsigned int uid; 2283 unsigned int uid;
2267 2284
2268 unsigned int precision : 9; 2285 unsigned int precision : 10;
2269 ENUM_BITFIELD(machine_mode) mode : 7;
2270
2271 unsigned string_flag : 1;
2272 unsigned no_force_blk_flag : 1; 2286 unsigned no_force_blk_flag : 1;
2273 unsigned needs_constructing_flag : 1; 2287 unsigned needs_constructing_flag : 1;
2274 unsigned transparent_union_flag : 1; 2288 unsigned transparent_union_flag : 1;
2275 unsigned packed_flag : 1;
2276 unsigned restrict_flag : 1; 2289 unsigned restrict_flag : 1;
2277 unsigned contains_placeholder_bits : 2; 2290 unsigned contains_placeholder_bits : 2;
2278 2291
2292 ENUM_BITFIELD(machine_mode) mode : 8;
2293
2294 unsigned string_flag : 1;
2279 unsigned lang_flag_0 : 1; 2295 unsigned lang_flag_0 : 1;
2280 unsigned lang_flag_1 : 1; 2296 unsigned lang_flag_1 : 1;
2281 unsigned lang_flag_2 : 1; 2297 unsigned lang_flag_2 : 1;
2282 unsigned lang_flag_3 : 1; 2298 unsigned lang_flag_3 : 1;
2283 unsigned lang_flag_4 : 1; 2299 unsigned lang_flag_4 : 1;
2284 unsigned lang_flag_5 : 1; 2300 unsigned lang_flag_5 : 1;
2285 unsigned lang_flag_6 : 1; 2301 unsigned lang_flag_6 : 1;
2286 unsigned user_align : 1;
2287 2302
2288 unsigned int align; 2303 unsigned int align;
2289 alias_set_type alias_set; 2304 alias_set_type alias_set;
2290 tree pointer_to; 2305 tree pointer_to;
2291 tree reference_to; 2306 tree reference_to;
2408 points either to the binfo for which this is a primary binfo, or to 2423 points either to the binfo for which this is a primary binfo, or to
2409 the binfo of the most derived type. */ 2424 the binfo of the most derived type. */
2410 #define BINFO_INHERITANCE_CHAIN(NODE) \ 2425 #define BINFO_INHERITANCE_CHAIN(NODE) \
2411 (TREE_BINFO_CHECK(NODE)->binfo.inheritance) 2426 (TREE_BINFO_CHECK(NODE)->binfo.inheritance)
2412 2427
2413 struct tree_binfo GTY (()) 2428 struct GTY (()) tree_binfo {
2414 {
2415 struct tree_common common; 2429 struct tree_common common;
2416 2430
2417 tree offset; 2431 tree offset;
2418 tree vtable; 2432 tree vtable;
2419 tree virtuals; 2433 tree virtuals;
2433 /* Nonzero if DECL represents a variable for the SSA passes. */ 2447 /* Nonzero if DECL represents a variable for the SSA passes. */
2434 #define SSA_VAR_P(DECL) \ 2448 #define SSA_VAR_P(DECL) \
2435 (TREE_CODE (DECL) == VAR_DECL \ 2449 (TREE_CODE (DECL) == VAR_DECL \
2436 || TREE_CODE (DECL) == PARM_DECL \ 2450 || TREE_CODE (DECL) == PARM_DECL \
2437 || TREE_CODE (DECL) == RESULT_DECL \ 2451 || TREE_CODE (DECL) == RESULT_DECL \
2438 || MTAG_P (DECL) \
2439 || (TREE_CODE (DECL) == SSA_NAME \ 2452 || (TREE_CODE (DECL) == SSA_NAME \
2440 && (TREE_CODE (SSA_NAME_VAR (DECL)) == VAR_DECL \ 2453 && (TREE_CODE (SSA_NAME_VAR (DECL)) == VAR_DECL \
2441 || TREE_CODE (SSA_NAME_VAR (DECL)) == PARM_DECL \ 2454 || TREE_CODE (SSA_NAME_VAR (DECL)) == PARM_DECL \
2442 || TREE_CODE (SSA_NAME_VAR (DECL)) == RESULT_DECL \ 2455 || TREE_CODE (SSA_NAME_VAR (DECL)) == RESULT_DECL)))
2443 || MTAG_P (SSA_NAME_VAR (DECL)))))
2444 2456
2445 2457
2446 2458
2447 2459
2448 /* Enumerate visibility settings. */ 2460 /* Enumerate visibility settings. */
2465 #define DECL_NAME(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.name) 2477 #define DECL_NAME(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.name)
2466 2478
2467 /* Every ..._DECL node gets a unique number. */ 2479 /* Every ..._DECL node gets a unique number. */
2468 #define DECL_UID(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.uid) 2480 #define DECL_UID(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.uid)
2469 2481
2482 /* DEBUG_EXPR_DECLs get negative UID numbers, to catch erroneous
2483 uses. */
2484 #define DEBUG_TEMP_UID(NODE) (-DECL_UID (TREE_CHECK ((NODE), DEBUG_EXPR_DECL)))
2485
2470 /* These two fields describe where in the source code the declaration 2486 /* These two fields describe where in the source code the declaration
2471 was. If the declaration appears in several places (as for a C 2487 was. If the declaration appears in several places (as for a C
2472 function that is declared first and then defined later), this 2488 function that is declared first and then defined later), this
2473 information should refer to the definition. */ 2489 information should refer to the definition. */
2474 #define DECL_SOURCE_LOCATION(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.locus) 2490 #define DECL_SOURCE_LOCATION(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.locus)
2477 #define DECL_IS_BUILTIN(DECL) \ 2493 #define DECL_IS_BUILTIN(DECL) \
2478 (DECL_SOURCE_LOCATION (DECL) <= BUILTINS_LOCATION) 2494 (DECL_SOURCE_LOCATION (DECL) <= BUILTINS_LOCATION)
2479 2495
2480 /* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or 2496 /* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
2481 QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL, 2497 QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL,
2482 PARM_DECL, FUNCTION_DECL, LABEL_DECL, and CONST_DECL nodes, this 2498 PARM_DECL, FUNCTION_DECL, LABEL_DECL, RESULT_DECL, and CONST_DECL
2483 points to either the FUNCTION_DECL for the containing function, 2499 nodes, this points to either the FUNCTION_DECL for the containing
2484 the RECORD_TYPE or UNION_TYPE for the containing type, or 2500 function, the RECORD_TYPE or UNION_TYPE for the containing type, or
2485 NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file 2501 NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file
2486 scope". */ 2502 scope". */
2487 #define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context) 2503 #define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context)
2488 #define DECL_FIELD_CONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl_minimal.context) 2504 #define DECL_FIELD_CONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl_minimal.context)
2489 struct tree_decl_minimal GTY(()) 2505 struct GTY(()) tree_decl_minimal {
2490 {
2491 struct tree_common common; 2506 struct tree_common common;
2492 location_t locus; 2507 location_t locus;
2493 unsigned int uid; 2508 unsigned int uid;
2494 tree name; 2509 tree name;
2495 tree context; 2510 tree context;
2496 }; 2511 };
2497 2512
2498 /* When computing aliasing information, we represent the memory pointed-to
2499 by pointers with artificial variables called "memory tags" (MT). There
2500 are two kinds of tags, namely symbol and name:
2501
2502 Symbol tags (SMT) are used in flow-insensitive alias analysis, they
2503 represent all the pointed-to locations and variables pointed-to by
2504 the same pointer symbol. Usually, this set is computed using
2505 type-based analysis (i.e., alias set classes), but this may not
2506 always be the case.
2507
2508 Name tags (NMT) are used in flow-sensitive points-to alias
2509 analysis, they represent the variables and memory locations
2510 pointed-to by a specific SSA_NAME pointer.
2511
2512 In general, given a pointer P with a symbol tag SMT, the alias set
2513 of SMT should be the union of all the alias sets of the NMTs of
2514 every SSA_NAME for P. */
2515 struct tree_memory_tag GTY(())
2516 {
2517 struct tree_decl_minimal common;
2518
2519 bitmap GTY ((skip)) aliases;
2520
2521 /* True if this tag has global scope. */
2522 unsigned int is_global : 1;
2523 };
2524
2525 #define MTAG_GLOBAL(NODE) (TREE_MEMORY_TAG_CHECK (NODE)->mtag.is_global)
2526 #define MTAG_ALIASES(NODE) (TREE_MEMORY_TAG_CHECK (NODE)->mtag.aliases)
2527
2528 /* Memory Partition Tags (MPTs) group memory symbols under one
2529 common name for the purposes of placing memory PHI nodes. */
2530
2531 struct tree_memory_partition_tag GTY(())
2532 {
2533 struct tree_memory_tag common;
2534
2535 /* Set of symbols grouped under this MPT. */
2536 bitmap symbols;
2537 };
2538
2539 #define MPT_SYMBOLS(NODE) (MEMORY_PARTITION_TAG_CHECK (NODE)->mpt.symbols)
2540
2541 2513
2542 /* For any sort of a ..._DECL node, this points to the original (abstract) 2514 /* For any sort of a ..._DECL node, this points to the original (abstract)
2543 decl node which this decl is an instance of, or else it is NULL indicating 2515 decl node which this decl is an inlined/cloned instance of, or else it
2544 that this decl is not an instance of some other decl. For example, 2516 is NULL indicating that this decl is not an instance of some other decl.
2545 in a nested declaration of an inline function, this points back to the 2517
2546 definition. */ 2518 The C front-end also uses this in a nested declaration of an inline
2519 function, to point back to the definition. */
2547 #define DECL_ABSTRACT_ORIGIN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.abstract_origin) 2520 #define DECL_ABSTRACT_ORIGIN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.abstract_origin)
2548 2521
2549 /* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract 2522 /* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract
2550 origin. This is useful when setting the DECL_ABSTRACT_ORIGIN. */ 2523 origin. This is useful when setting the DECL_ABSTRACT_ORIGIN. */
2551 #define DECL_ORIGIN(NODE) \ 2524 #define DECL_ORIGIN(NODE) \
2582 #define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.align) 2555 #define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.align)
2583 /* The alignment of NODE, in bytes. */ 2556 /* The alignment of NODE, in bytes. */
2584 #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT) 2557 #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT)
2585 /* Set if the alignment of this DECL has been set by the user, for 2558 /* Set if the alignment of this DECL has been set by the user, for
2586 example with an 'aligned' attribute. */ 2559 example with an 'aligned' attribute. */
2587 #define DECL_USER_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.user_align) 2560 #define DECL_USER_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->common.base.user_align)
2588 /* Holds the machine mode corresponding to the declaration of a variable or 2561 /* Holds the machine mode corresponding to the declaration of a variable or
2589 field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a 2562 field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a
2590 FIELD_DECL. */ 2563 FIELD_DECL. */
2591 #define DECL_MODE(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.mode) 2564 #define DECL_MODE(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.mode)
2592 2565
2597 #define DECL_FUNCTION_CODE(NODE) \ 2570 #define DECL_FUNCTION_CODE(NODE) \
2598 (FUNCTION_DECL_CHECK (NODE)->function_decl.function_code) 2571 (FUNCTION_DECL_CHECK (NODE)->function_decl.function_code)
2599 #define DECL_DEBUG_EXPR_IS_FROM(NODE) \ 2572 #define DECL_DEBUG_EXPR_IS_FROM(NODE) \
2600 (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from) 2573 (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from)
2601 2574
2575 #define DECL_FUNCTION_PERSONALITY(NODE) \
2576 (FUNCTION_DECL_CHECK (NODE)->function_decl.personality)
2577
2602 /* Nonzero for a given ..._DECL node means that the name of this node should 2578 /* Nonzero for a given ..._DECL node means that the name of this node should
2603 be ignored for symbolic debug purposes. */ 2579 be ignored for symbolic debug purposes. Moreover, for a FUNCTION_DECL,
2580 the body of the function should also be ignored. */
2604 #define DECL_IGNORED_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.ignored_flag) 2581 #define DECL_IGNORED_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.ignored_flag)
2605 2582
2606 /* Nonzero for a given ..._DECL node means that this node represents an 2583 /* Nonzero for a given ..._DECL node means that this node represents an
2607 "abstract instance" of the given declaration (e.g. in the original 2584 "abstract instance" of the given declaration (e.g. in the original
2608 declaration of an inline function). When generating symbolic debugging 2585 declaration of an inline function). When generating symbolic debugging
2619 this does not necessarily imply the entity represented by NODE 2596 this does not necessarily imply the entity represented by NODE
2620 has no program source-level definition in this translation unit. For 2597 has no program source-level definition in this translation unit. For
2621 example, for a FUNCTION_DECL, DECL_SAVED_TREE may be non-NULL and 2598 example, for a FUNCTION_DECL, DECL_SAVED_TREE may be non-NULL and
2622 DECL_EXTERNAL may be true simultaneously; that can be the case for 2599 DECL_EXTERNAL may be true simultaneously; that can be the case for
2623 a C99 "extern inline" function. */ 2600 a C99 "extern inline" function. */
2624 #define DECL_EXTERNAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.decl_flag_2) 2601 #define DECL_EXTERNAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.decl_flag_1)
2625 2602
2626 /* Nonzero in a ..._DECL means this variable is ref'd from a nested function. 2603 /* Nonzero in a ..._DECL means this variable is ref'd from a nested function.
2627 For VAR_DECL nodes, PARM_DECL nodes, and FUNCTION_DECL nodes. 2604 For VAR_DECL nodes, PARM_DECL nodes, and FUNCTION_DECL nodes.
2628 2605
2629 For LABEL_DECL nodes, nonzero if nonlocal gotos to the label are permitted. 2606 For LABEL_DECL nodes, nonzero if nonlocal gotos to the label are permitted.
2647 #define DECL_LANG_FLAG_3(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_3) 2624 #define DECL_LANG_FLAG_3(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_3)
2648 #define DECL_LANG_FLAG_4(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_4) 2625 #define DECL_LANG_FLAG_4(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_4)
2649 #define DECL_LANG_FLAG_5(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_5) 2626 #define DECL_LANG_FLAG_5(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_5)
2650 #define DECL_LANG_FLAG_6(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_6) 2627 #define DECL_LANG_FLAG_6(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_6)
2651 #define DECL_LANG_FLAG_7(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_7) 2628 #define DECL_LANG_FLAG_7(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_7)
2652 2629 #define DECL_LANG_FLAG_8(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_8)
2653 /* Used to indicate an alias set for the memory pointed to by this
2654 particular FIELD_DECL, PARM_DECL, or VAR_DECL, which must have
2655 pointer (or reference) type. */
2656 #define DECL_POINTER_ALIAS_SET(NODE) \
2657 (DECL_COMMON_CHECK (NODE)->decl_common.pointer_alias_set)
2658
2659 /* Nonzero if an alias set has been assigned to this declaration. */
2660 #define DECL_POINTER_ALIAS_SET_KNOWN_P(NODE) \
2661 (DECL_POINTER_ALIAS_SET (NODE) != - 1)
2662 2630
2663 /* Nonzero for a decl which is at file scope. */ 2631 /* Nonzero for a decl which is at file scope. */
2664 #define DECL_FILE_SCOPE_P(EXP) \ 2632 #define DECL_FILE_SCOPE_P(EXP) \
2665 (! DECL_CONTEXT (EXP) \ 2633 (! DECL_CONTEXT (EXP) \
2666 || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL) 2634 || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
2677 be treated as a GIMPLE register, and use real instead of 2645 be treated as a GIMPLE register, and use real instead of
2678 virtual ops in SSA form. */ 2646 virtual ops in SSA form. */
2679 #define DECL_GIMPLE_REG_P(DECL) \ 2647 #define DECL_GIMPLE_REG_P(DECL) \
2680 DECL_COMMON_CHECK (DECL)->decl_common.gimple_reg_flag 2648 DECL_COMMON_CHECK (DECL)->decl_common.gimple_reg_flag
2681 2649
2682 /* For a DECL with pointer type, this is set if Type Based Alias 2650 struct GTY(()) tree_decl_common {
2683 Analysis should not be applied to this DECL. */
2684 #define DECL_NO_TBAA_P(DECL) \
2685 DECL_COMMON_CHECK (DECL)->decl_common.no_tbaa_flag
2686
2687 struct tree_decl_common GTY(())
2688 {
2689 struct tree_decl_minimal common; 2651 struct tree_decl_minimal common;
2690 tree size; 2652 tree size;
2691 2653
2692 ENUM_BITFIELD(machine_mode) mode : 8; 2654 ENUM_BITFIELD(machine_mode) mode : 8;
2693 2655
2694 unsigned nonlocal_flag : 1; 2656 unsigned nonlocal_flag : 1;
2695 unsigned virtual_flag : 1; 2657 unsigned virtual_flag : 1;
2696 unsigned ignored_flag : 1; 2658 unsigned ignored_flag : 1;
2697 unsigned abstract_flag : 1; 2659 unsigned abstract_flag : 1;
2698 unsigned artificial_flag : 1; 2660 unsigned artificial_flag : 1;
2699 unsigned user_align : 1;
2700 unsigned preserve_flag: 1; 2661 unsigned preserve_flag: 1;
2701 unsigned debug_expr_is_from : 1; 2662 unsigned debug_expr_is_from : 1;
2702 2663
2703 unsigned lang_flag_0 : 1; 2664 unsigned lang_flag_0 : 1;
2704 unsigned lang_flag_1 : 1; 2665 unsigned lang_flag_1 : 1;
2706 unsigned lang_flag_3 : 1; 2667 unsigned lang_flag_3 : 1;
2707 unsigned lang_flag_4 : 1; 2668 unsigned lang_flag_4 : 1;
2708 unsigned lang_flag_5 : 1; 2669 unsigned lang_flag_5 : 1;
2709 unsigned lang_flag_6 : 1; 2670 unsigned lang_flag_6 : 1;
2710 unsigned lang_flag_7 : 1; 2671 unsigned lang_flag_7 : 1;
2672 unsigned lang_flag_8 : 1;
2711 2673
2712 /* In LABEL_DECL, this is DECL_ERROR_ISSUED. 2674 /* In LABEL_DECL, this is DECL_ERROR_ISSUED.
2713 In VAR_DECL and PARM_DECL, this is DECL_REGISTER. */ 2675 In VAR_DECL and PARM_DECL, this is DECL_REGISTER. */
2714 unsigned decl_flag_0 : 1; 2676 unsigned decl_flag_0 : 1;
2715 /* In FIELD_DECL, this is DECL_PACKED. */
2716 unsigned decl_flag_1 : 1;
2717 /* In FIELD_DECL, this is DECL_BIT_FIELD 2677 /* In FIELD_DECL, this is DECL_BIT_FIELD
2718 In VAR_DECL and FUNCTION_DECL, this is DECL_EXTERNAL. 2678 In VAR_DECL and FUNCTION_DECL, this is DECL_EXTERNAL.
2719 In TYPE_DECL, this is TYPE_DECL_SUPRESS_DEBUG. */ 2679 In TYPE_DECL, this is TYPE_DECL_SUPPRESS_DEBUG. */
2680 unsigned decl_flag_1 : 1;
2681 /* In FIELD_DECL, this is DECL_NONADDRESSABLE_P
2682 In VAR_DECL and PARM_DECL, this is DECL_HAS_VALUE_EXPR_P. */
2720 unsigned decl_flag_2 : 1; 2683 unsigned decl_flag_2 : 1;
2721 /* In FIELD_DECL, this is DECL_NONADDRESSABLE_P
2722 In VAR_DECL and PARM_DECL, this is DECL_HAS_VALUE_EXPR. */
2723 unsigned decl_flag_3 : 1;
2724 /* Logically, these two would go in a theoretical base shared by var and 2684 /* Logically, these two would go in a theoretical base shared by var and
2725 parm decl. */ 2685 parm decl. */
2726 unsigned gimple_reg_flag : 1; 2686 unsigned gimple_reg_flag : 1;
2727 /* In a DECL with pointer type, set if no TBAA should be done. */ 2687 /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_BY_REFERENCE. */
2728 unsigned no_tbaa_flag : 1; 2688 unsigned decl_by_reference_flag : 1;
2729 /* Padding so that 'align' can be on a 32-bit boundary. */ 2689 /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_RESTRICTED_P. */
2690 unsigned decl_restricted_flag : 1;
2691
2692 /* Padding so that 'off_align' can be on a 32-bit boundary. */
2730 unsigned decl_common_unused : 2; 2693 unsigned decl_common_unused : 2;
2731 2694
2732 unsigned int align : 24;
2733 /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */ 2695 /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */
2734 unsigned int off_align : 8; 2696 unsigned int off_align : 8;
2697
2698 /* 24-bits unused. */
2699
2700 /* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */
2701 unsigned int align;
2735 2702
2736 tree size_unit; 2703 tree size_unit;
2737 tree initial; 2704 tree initial;
2738 tree attributes; 2705 tree attributes;
2739 tree abstract_origin; 2706 tree abstract_origin;
2740 2707
2741 alias_set_type pointer_alias_set;
2742 /* Points to a structure whose details depend on the language in use. */ 2708 /* Points to a structure whose details depend on the language in use. */
2743 struct lang_decl *lang_specific; 2709 struct lang_decl *lang_specific;
2744 }; 2710 };
2745 2711
2746 extern tree decl_value_expr_lookup (tree); 2712 extern tree decl_value_expr_lookup (tree);
2749 /* In a VAR_DECL or PARM_DECL, the location at which the value may be found, 2715 /* In a VAR_DECL or PARM_DECL, the location at which the value may be found,
2750 if transformations have made this more complicated than evaluating the 2716 if transformations have made this more complicated than evaluating the
2751 decl itself. This should only be used for debugging; once this field has 2717 decl itself. This should only be used for debugging; once this field has
2752 been set, the decl itself may not legitimately appear in the function. */ 2718 been set, the decl itself may not legitimately appear in the function. */
2753 #define DECL_HAS_VALUE_EXPR_P(NODE) \ 2719 #define DECL_HAS_VALUE_EXPR_P(NODE) \
2754 (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_flag_3) 2720 (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_flag_2)
2755 #define DECL_VALUE_EXPR(NODE) \ 2721 #define DECL_VALUE_EXPR(NODE) \
2756 (decl_value_expr_lookup (DECL_WRTL_CHECK (NODE))) 2722 (decl_value_expr_lookup (DECL_WRTL_CHECK (NODE)))
2757 #define SET_DECL_VALUE_EXPR(NODE, VAL) \ 2723 #define SET_DECL_VALUE_EXPR(NODE, VAL) \
2758 (decl_value_expr_insert (DECL_WRTL_CHECK (NODE), VAL)) 2724 (decl_value_expr_insert (DECL_WRTL_CHECK (NODE), VAL))
2759 2725
2783 #define DECL_RTL_IF_SET(NODE) (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL) 2749 #define DECL_RTL_IF_SET(NODE) (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL)
2784 2750
2785 /* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'. */ 2751 /* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'. */
2786 #define DECL_REGISTER(NODE) (DECL_WRTL_CHECK (NODE)->decl_common.decl_flag_0) 2752 #define DECL_REGISTER(NODE) (DECL_WRTL_CHECK (NODE)->decl_common.decl_flag_0)
2787 2753
2788 struct tree_decl_with_rtl GTY(()) 2754 struct GTY(()) tree_decl_with_rtl {
2789 {
2790 struct tree_decl_common common; 2755 struct tree_decl_common common;
2791 rtx rtl; 2756 rtx rtl;
2792 }; 2757 };
2793 2758
2794 /* In a FIELD_DECL, this is the field position, counting in bytes, of the 2759 /* In a FIELD_DECL, this is the field position, counting in bytes, of the
2828 which this FIELD_DECL is defined. This information is needed when 2793 which this FIELD_DECL is defined. This information is needed when
2829 writing debugging information about vfield and vbase decls for C++. */ 2794 writing debugging information about vfield and vbase decls for C++. */
2830 #define DECL_FCONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.fcontext) 2795 #define DECL_FCONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.fcontext)
2831 2796
2832 /* In a FIELD_DECL, indicates this field should be bit-packed. */ 2797 /* In a FIELD_DECL, indicates this field should be bit-packed. */
2833 #define DECL_PACKED(NODE) (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_1) 2798 #define DECL_PACKED(NODE) (FIELD_DECL_CHECK (NODE)->common.base.packed_flag)
2834 2799
2835 /* Nonzero in a FIELD_DECL means it is a bit field, and must be accessed 2800 /* Nonzero in a FIELD_DECL means it is a bit field, and must be accessed
2836 specially. */ 2801 specially. */
2837 #define DECL_BIT_FIELD(NODE) (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_2) 2802 #define DECL_BIT_FIELD(NODE) (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_1)
2838 2803
2839 /* Used in a FIELD_DECL to indicate that we cannot form the address of 2804 /* Used in a FIELD_DECL to indicate that we cannot form the address of
2840 this component. This makes it possible for Type-Based Alias Analysis 2805 this component. This makes it possible for Type-Based Alias Analysis
2841 to disambiguate accesses to this field with indirect accesses using 2806 to disambiguate accesses to this field with indirect accesses using
2842 the field's type: 2807 the field's type:
2850 field 'i' (int) will not be recorded as a subset of that of the type of 2815 field 'i' (int) will not be recorded as a subset of that of the type of
2851 's' (struct S) in record_component_aliases. The counterpart is that 2816 's' (struct S) in record_component_aliases. The counterpart is that
2852 accesses to s.i must not be given the alias set of the type of 'i' 2817 accesses to s.i must not be given the alias set of the type of 'i'
2853 (int) but instead directly that of the type of 's' (struct S). */ 2818 (int) but instead directly that of the type of 's' (struct S). */
2854 #define DECL_NONADDRESSABLE_P(NODE) \ 2819 #define DECL_NONADDRESSABLE_P(NODE) \
2855 (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_3) 2820 (FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_2)
2856 2821
2857 struct tree_field_decl GTY(()) 2822 struct GTY(()) tree_field_decl {
2858 {
2859 struct tree_decl_common common; 2823 struct tree_decl_common common;
2860 2824
2861 tree offset; 2825 tree offset;
2862 tree bit_field_type; 2826 tree bit_field_type;
2863 tree qualifier; 2827 tree qualifier;
2864 tree bit_offset; 2828 tree bit_offset;
2865 tree fcontext; 2829 tree fcontext;
2866
2867 }; 2830 };
2868 2831
2869 /* A numeric unique identifier for a LABEL_DECL. The UID allocation is 2832 /* A numeric unique identifier for a LABEL_DECL. The UID allocation is
2870 dense, unique within any one function, and may be used to index arrays. 2833 dense, unique within any one function, and may be used to index arrays.
2871 If the value is -1, then no UID has been assigned. */ 2834 If the value is -1, then no UID has been assigned. */
2872 #define LABEL_DECL_UID(NODE) \ 2835 #define LABEL_DECL_UID(NODE) \
2873 (LABEL_DECL_CHECK (NODE)->decl_common.pointer_alias_set) 2836 (LABEL_DECL_CHECK (NODE)->label_decl.label_decl_uid)
2837
2838 /* In a LABEL_DECL, the EH region number for which the label is the
2839 post_landing_pad. */
2840 #define EH_LANDING_PAD_NR(NODE) \
2841 (LABEL_DECL_CHECK (NODE)->label_decl.eh_landing_pad_nr)
2874 2842
2875 /* In LABEL_DECL nodes, nonzero means that an error message about 2843 /* In LABEL_DECL nodes, nonzero means that an error message about
2876 jumping into such a binding contour has been printed for this label. */ 2844 jumping into such a binding contour has been printed for this label. */
2877 #define DECL_ERROR_ISSUED(NODE) (LABEL_DECL_CHECK (NODE)->decl_common.decl_flag_0) 2845 #define DECL_ERROR_ISSUED(NODE) \
2878 2846 (LABEL_DECL_CHECK (NODE)->decl_common.decl_flag_0)
2879 struct tree_label_decl GTY(()) 2847
2880 { 2848 struct GTY(()) tree_label_decl {
2881 struct tree_decl_with_rtl common; 2849 struct tree_decl_with_rtl common;
2882 }; 2850 int label_decl_uid;
2883 2851 int eh_landing_pad_nr;
2884 struct tree_result_decl GTY(()) 2852 };
2885 { 2853
2854 struct var_ann_d;
2855 struct GTY(()) tree_result_decl {
2886 struct tree_decl_with_rtl common; 2856 struct tree_decl_with_rtl common;
2887 }; 2857 struct var_ann_d *ann;
2888 2858 };
2889 struct tree_const_decl GTY(()) 2859
2890 { 2860 struct GTY(()) tree_const_decl {
2891 struct tree_decl_with_rtl common; 2861 struct tree_decl_with_rtl common;
2892 }; 2862 };
2893 2863
2894 /* For a PARM_DECL, records the data type used to pass the argument, 2864 /* For a PARM_DECL, records the data type used to pass the argument,
2895 which may be different from the type seen in the program. */ 2865 which may be different from the type seen in the program. */
2897 2867
2898 /* For PARM_DECL, holds an RTL for the stack slot or register 2868 /* For PARM_DECL, holds an RTL for the stack slot or register
2899 where the data was actually passed. */ 2869 where the data was actually passed. */
2900 #define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->parm_decl.incoming_rtl) 2870 #define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->parm_decl.incoming_rtl)
2901 2871
2902 struct tree_parm_decl GTY(()) 2872 struct GTY(()) tree_parm_decl {
2903 {
2904 struct tree_decl_with_rtl common; 2873 struct tree_decl_with_rtl common;
2905 rtx incoming_rtl; 2874 rtx incoming_rtl;
2875 struct var_ann_d *ann;
2906 }; 2876 };
2907 2877
2908 2878
2909 /* Nonzero in a decl means that the gimplifier has seen (or placed) 2879 /* Nonzero in a decl means that the gimplifier has seen (or placed)
2910 this variable in a BIND_EXPR. */ 2880 this variable in a BIND_EXPR. */
2921 (in_system_header_at (DECL_SOURCE_LOCATION (NODE))) 2891 (in_system_header_at (DECL_SOURCE_LOCATION (NODE)))
2922 2892
2923 /* Used to indicate that this DECL has weak linkage. */ 2893 /* Used to indicate that this DECL has weak linkage. */
2924 #define DECL_WEAK(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.weak_flag) 2894 #define DECL_WEAK(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.weak_flag)
2925 2895
2926 /* Internal to the gimplifier. Indicates that the value is a formal
2927 temporary controlled by the gimplifier. */
2928 #define DECL_GIMPLE_FORMAL_TEMP_P(DECL) \
2929 DECL_WITH_VIS_CHECK (DECL)->decl_with_vis.gimple_formal_temp
2930
2931 /* Used to indicate that the DECL is a dllimport. */ 2896 /* Used to indicate that the DECL is a dllimport. */
2932 #define DECL_DLLIMPORT_P(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.dllimport_flag) 2897 #define DECL_DLLIMPORT_P(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.dllimport_flag)
2933
2934 /* DECL_BASED_ON_RESTRICT_P records whether a VAR_DECL is a temporary
2935 based on a variable with a restrict qualified type. If it is,
2936 DECL_RESTRICT_BASE returns the restrict qualified variable on which
2937 it is based. */
2938
2939 #define DECL_BASED_ON_RESTRICT_P(NODE) \
2940 (VAR_DECL_CHECK (NODE)->decl_with_vis.based_on_restrict_p)
2941 #define DECL_GET_RESTRICT_BASE(NODE) \
2942 (decl_restrict_base_lookup (VAR_DECL_CHECK (NODE)))
2943 #define SET_DECL_RESTRICT_BASE(NODE, VAL) \
2944 (decl_restrict_base_insert (VAR_DECL_CHECK (NODE), (VAL)))
2945
2946 extern tree decl_restrict_base_lookup (tree);
2947 extern void decl_restrict_base_insert (tree, tree);
2948 2898
2949 /* Used in a DECL to indicate that, even if it TREE_PUBLIC, it need 2899 /* Used in a DECL to indicate that, even if it TREE_PUBLIC, it need
2950 not be put out unless it is needed in this translation unit. 2900 not be put out unless it is needed in this translation unit.
2951 Entities like this are shared across translation units (like weak 2901 Entities like this are shared across translation units (like weak
2952 entities), but are guaranteed to be generated by any translation 2902 entities), but are guaranteed to be generated by any translation
2955 back-end; it is up to front-ends which set this flag to ensure 2905 back-end; it is up to front-ends which set this flag to ensure
2956 that there will never be any harm, other than bloat, in putting out 2906 that there will never be any harm, other than bloat, in putting out
2957 something which is DECL_COMDAT. */ 2907 something which is DECL_COMDAT. */
2958 #define DECL_COMDAT(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_flag) 2908 #define DECL_COMDAT(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_flag)
2959 2909
2910 #define DECL_COMDAT_GROUP(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_group)
2911
2960 /* A replaceable function is one which may be replaced at link-time 2912 /* A replaceable function is one which may be replaced at link-time
2961 with an entirely different definition, provided that the 2913 with an entirely different definition, provided that the
2962 replacement has the same type. For example, functions declared 2914 replacement has the same type. For example, functions declared
2963 with __attribute__((weak)) on most systems are replaceable. 2915 with __attribute__((weak)) on most systems are replaceable.
2964 2916
2965 COMDAT functions are not replaceable, since all definitions of the 2917 COMDAT functions are not replaceable, since all definitions of the
2966 function must be equivalent. It is important that COMDAT functions 2918 function must be equivalent. It is important that COMDAT functions
2967 not be treated as replaceable so that use of C++ template 2919 not be treated as replaceable so that use of C++ template
2968 instantiations is not penalized. 2920 instantiations is not penalized.
2969 2921
2970 For example, DECL_REPLACEABLE is used to determine whether or not a 2922 For example, DECL_REPLACEABLE is used to determine whether or not a
2971 function (including a template instantiation) which is not 2923 function (including a template instantiation) which is not
2972 explicitly declared "inline" can be inlined. If the function is 2924 explicitly declared "inline" can be inlined. If the function is
2973 DECL_REPLACEABLE then it is not safe to do the inlining, since the 2925 DECL_REPLACEABLE then it is not safe to do the inlining, since the
3023 being inferred. */ 2975 being inferred. */
3024 #define DECL_VISIBILITY_SPECIFIED(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility_specified) 2976 #define DECL_VISIBILITY_SPECIFIED(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility_specified)
3025 2977
3026 /* Used in TREE_PUBLIC decls to indicate that copies of this DECL in 2978 /* Used in TREE_PUBLIC decls to indicate that copies of this DECL in
3027 multiple translation units should be merged. */ 2979 multiple translation units should be merged. */
3028 #define DECL_ONE_ONLY(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.one_only) 2980 #define DECL_ONE_ONLY(NODE) (DECL_COMDAT_GROUP (NODE) != NULL_TREE)
3029 2981
3030 struct tree_decl_with_vis GTY(()) 2982 struct GTY(()) tree_decl_with_vis {
3031 {
3032 struct tree_decl_with_rtl common; 2983 struct tree_decl_with_rtl common;
3033 tree assembler_name; 2984 tree assembler_name;
3034 tree section_name; 2985 tree section_name;
2986 tree comdat_group;
3035 2987
3036 /* Belong to VAR_DECL exclusively. */ 2988 /* Belong to VAR_DECL exclusively. */
3037 unsigned defer_output:1; 2989 unsigned defer_output : 1;
3038 unsigned hard_register:1; 2990 unsigned hard_register : 1;
3039 unsigned thread_local:1; 2991 unsigned thread_local : 1;
3040 unsigned common_flag:1; 2992 unsigned common_flag : 1;
3041 unsigned in_text_section : 1; 2993 unsigned in_text_section : 1;
3042 unsigned gimple_formal_temp : 1;
3043 unsigned dllimport_flag : 1; 2994 unsigned dllimport_flag : 1;
3044 unsigned based_on_restrict_p : 1;
3045 /* Used by C++. Might become a generic decl flag. */ 2995 /* Used by C++. Might become a generic decl flag. */
3046 unsigned shadowed_for_var_p : 1; 2996 unsigned shadowed_for_var_p : 1;
3047
3048 /* Don't belong to VAR_DECL exclusively. */ 2997 /* Don't belong to VAR_DECL exclusively. */
3049 unsigned weak_flag:1; 2998 unsigned weak_flag : 1;
2999
3050 unsigned seen_in_bind_expr : 1; 3000 unsigned seen_in_bind_expr : 1;
3051 unsigned comdat_flag : 1; 3001 unsigned comdat_flag : 1;
3052 ENUM_BITFIELD(symbol_visibility) visibility : 2; 3002 ENUM_BITFIELD(symbol_visibility) visibility : 2;
3053 unsigned visibility_specified : 1; 3003 unsigned visibility_specified : 1;
3054 /* Belong to FUNCTION_DECL exclusively. */
3055 unsigned one_only : 1;
3056 unsigned init_priority_p:1;
3057
3058 /* Belongs to VAR_DECL exclusively. */ 3004 /* Belongs to VAR_DECL exclusively. */
3059 ENUM_BITFIELD(tls_model) tls_model : 3; 3005 ENUM_BITFIELD(tls_model) tls_model : 3;
3060 /* 12 unused bits. */ 3006
3007 /* Belong to FUNCTION_DECL exclusively. */
3008 unsigned init_priority_p : 1;
3009 /* 15 unused bits. */
3061 }; 3010 };
3062 3011
3063 /* In a VAR_DECL that's static, 3012 /* In a VAR_DECL that's static,
3064 nonzero if the space is in the text section. */ 3013 nonzero if the space is in the text section. */
3065 #define DECL_IN_TEXT_SECTION(NODE) (VAR_DECL_CHECK (NODE)->decl_with_vis.in_text_section) 3014 #define DECL_IN_TEXT_SECTION(NODE) (VAR_DECL_CHECK (NODE)->decl_with_vis.in_text_section)
3097 will be initialized at the DEFAULT_INIT_PRIORITY. */ 3046 will be initialized at the DEFAULT_INIT_PRIORITY. */
3098 #define DECL_HAS_INIT_PRIORITY_P(NODE) \ 3047 #define DECL_HAS_INIT_PRIORITY_P(NODE) \
3099 (VAR_DECL_CHECK (NODE)->decl_with_vis.init_priority_p) 3048 (VAR_DECL_CHECK (NODE)->decl_with_vis.init_priority_p)
3100 3049
3101 /* For a VAR_DECL or FUNCTION_DECL the initialization priority of 3050 /* For a VAR_DECL or FUNCTION_DECL the initialization priority of
3102 NODE. */ 3051 NODE. */
3103 #define DECL_INIT_PRIORITY(NODE) \ 3052 #define DECL_INIT_PRIORITY(NODE) \
3104 (decl_init_priority_lookup (NODE)) 3053 (decl_init_priority_lookup (NODE))
3105 /* Set the initialization priority for NODE to VAL. */ 3054 /* Set the initialization priority for NODE to VAL. */
3106 #define SET_DECL_INIT_PRIORITY(NODE, VAL) \ 3055 #define SET_DECL_INIT_PRIORITY(NODE, VAL) \
3107 (decl_init_priority_insert (NODE, VAL)) 3056 (decl_init_priority_insert (NODE, VAL))
3131 /* In a VAR_DECL, nonzero if the data should be allocated from 3080 /* In a VAR_DECL, nonzero if the data should be allocated from
3132 thread-local storage. */ 3081 thread-local storage. */
3133 #define DECL_THREAD_LOCAL_P(NODE) \ 3082 #define DECL_THREAD_LOCAL_P(NODE) \
3134 (VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model >= TLS_MODEL_REAL) 3083 (VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model >= TLS_MODEL_REAL)
3135 3084
3136 struct tree_var_decl GTY(()) 3085 #define DECL_VAR_ANN_PTR(NODE) \
3137 { 3086 (TREE_CODE (NODE) == VAR_DECL ? &(NODE)->var_decl.ann \
3087 : TREE_CODE (NODE) == PARM_DECL ? &(NODE)->parm_decl.ann \
3088 : TREE_CODE (NODE) == RESULT_DECL ? &(NODE)->result_decl.ann \
3089 : NULL)
3090
3091 struct GTY(()) tree_var_decl {
3138 struct tree_decl_with_vis common; 3092 struct tree_decl_with_vis common;
3093 struct var_ann_d *ann;
3139 }; 3094 };
3140 3095
3141 3096
3142 /* This field is used to reference anything in decl.result and is meant only 3097 /* This field is used to reference anything in decl.result and is meant only
3143 for use by the garbage collector. */ 3098 for use by the garbage collector. */
3151 to an INTEGER_CST node which is suitable for use as an index 3106 to an INTEGER_CST node which is suitable for use as an index
3152 into the virtual function table. 3107 into the virtual function table.
3153 C++ also uses this field in namespaces, hence the DECL_NON_COMMON_CHECK. */ 3108 C++ also uses this field in namespaces, hence the DECL_NON_COMMON_CHECK. */
3154 #define DECL_VINDEX(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.vindex) 3109 #define DECL_VINDEX(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.vindex)
3155 3110
3156 struct tree_decl_non_common GTY(()) 3111 struct GTY(())
3157 3112 tree_decl_non_common {
3158 {
3159 struct tree_decl_with_vis common; 3113 struct tree_decl_with_vis common;
3160 /* C++ uses this in namespaces. */ 3114 /* C++ uses this in namespaces. */
3161 tree saved_tree; 3115 tree saved_tree;
3162 /* C++ uses this in templates. */ 3116 /* C++ uses this in templates. */
3163 tree arguments; 3117 tree arguments;
3227 /* Used in FUNCTION_DECLs to indicate that limit-stack-* should be 3181 /* Used in FUNCTION_DECLs to indicate that limit-stack-* should be
3228 disabled in this function. */ 3182 disabled in this function. */
3229 #define DECL_NO_LIMIT_STACK(NODE) \ 3183 #define DECL_NO_LIMIT_STACK(NODE) \
3230 (FUNCTION_DECL_CHECK (NODE)->function_decl.no_limit_stack) 3184 (FUNCTION_DECL_CHECK (NODE)->function_decl.no_limit_stack)
3231 3185
3232 /* In a FUNCTION_DECL with a nonzero DECL_CONTEXT, indicates that a 3186 /* In a FUNCTION_DECL indicates that a static chain is needed. */
3233 static chain is not needed. */ 3187 #define DECL_STATIC_CHAIN(NODE) \
3234 #define DECL_NO_STATIC_CHAIN(NODE) \
3235 (FUNCTION_DECL_CHECK (NODE)->function_decl.regdecl_flag) 3188 (FUNCTION_DECL_CHECK (NODE)->function_decl.regdecl_flag)
3236 3189
3237 /* Nonzero for a decl that cgraph has decided should be inlined into 3190 /* Nonzero for a decl that cgraph has decided should be inlined into
3238 at least one call site. It is not meaningful to look at this 3191 at least one call site. It is not meaningful to look at this
3239 directly; always use cgraph_function_possibly_inlined_p. */ 3192 directly; always use cgraph_function_possibly_inlined_p. */
3288 /* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the 3241 /* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
3289 arguments/result/saved_tree fields by front ends. It was either inherit 3242 arguments/result/saved_tree fields by front ends. It was either inherit
3290 FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL, 3243 FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
3291 which seemed a bit strange. */ 3244 which seemed a bit strange. */
3292 3245
3293 struct tree_function_decl GTY(()) 3246 struct GTY(()) tree_function_decl {
3294 {
3295 struct tree_decl_non_common common; 3247 struct tree_decl_non_common common;
3296 3248
3297 struct function *f; 3249 struct function *f;
3250
3251 /* The personality function. Used for stack unwinding. */
3252 tree personality;
3298 3253
3299 /* Function specific options that are used by this function. */ 3254 /* Function specific options that are used by this function. */
3300 tree function_specific_target; /* target options */ 3255 tree function_specific_target; /* target options */
3301 tree function_specific_optimization; /* optimization options */ 3256 tree function_specific_optimization; /* optimization options */
3302 3257
3335 3290
3336 /* In a TYPE_DECL nonzero means the detail info about this type is not dumped 3291 /* In a TYPE_DECL nonzero means the detail info about this type is not dumped
3337 into stabs. Instead it will generate cross reference ('x') of names. 3292 into stabs. Instead it will generate cross reference ('x') of names.
3338 This uses the same flag as DECL_EXTERNAL. */ 3293 This uses the same flag as DECL_EXTERNAL. */
3339 #define TYPE_DECL_SUPPRESS_DEBUG(NODE) \ 3294 #define TYPE_DECL_SUPPRESS_DEBUG(NODE) \
3340 (TYPE_DECL_CHECK (NODE)->decl_common.decl_flag_2) 3295 (TYPE_DECL_CHECK (NODE)->decl_common.decl_flag_1)
3341 3296
3342 /* Getter of the imported declaration associated to the 3297 /* Getter of the imported declaration associated to the
3343 IMPORTED_DECL node. */ 3298 IMPORTED_DECL node. */
3344 #define IMPORTED_DECL_ASSOCIATED_DECL(NODE) \ 3299 #define IMPORTED_DECL_ASSOCIATED_DECL(NODE) \
3345 (DECL_INITIAL (IMPORTED_DECL_CHECK (NODE))) 3300 (DECL_INITIAL (IMPORTED_DECL_CHECK (NODE)))
3346 3301
3347 struct tree_type_decl GTY(()) 3302 struct GTY(()) tree_type_decl {
3348 {
3349 struct tree_decl_non_common common; 3303 struct tree_decl_non_common common;
3350 3304
3351 }; 3305 };
3352 3306
3353 /* A STATEMENT_LIST chains statements together in GENERIC and GIMPLE. 3307 /* A STATEMENT_LIST chains statements together in GENERIC and GIMPLE.
3359 #define STATEMENT_LIST_HEAD(NODE) \ 3313 #define STATEMENT_LIST_HEAD(NODE) \
3360 (STATEMENT_LIST_CHECK (NODE)->stmt_list.head) 3314 (STATEMENT_LIST_CHECK (NODE)->stmt_list.head)
3361 #define STATEMENT_LIST_TAIL(NODE) \ 3315 #define STATEMENT_LIST_TAIL(NODE) \
3362 (STATEMENT_LIST_CHECK (NODE)->stmt_list.tail) 3316 (STATEMENT_LIST_CHECK (NODE)->stmt_list.tail)
3363 3317
3364 struct tree_statement_list_node 3318 struct GTY ((chain_next ("%h.next"), chain_prev ("%h.prev"))) tree_statement_list_node
3365 GTY ((chain_next ("%h.next"), chain_prev ("%h.prev"))) 3319 {
3366 {
3367 struct tree_statement_list_node *prev; 3320 struct tree_statement_list_node *prev;
3368 struct tree_statement_list_node *next; 3321 struct tree_statement_list_node *next;
3369 tree stmt; 3322 tree stmt;
3370 }; 3323 };
3371 3324
3372 struct tree_statement_list 3325 struct GTY(()) tree_statement_list
3373 GTY(()) 3326 {
3374 {
3375 struct tree_common common; 3327 struct tree_common common;
3376 struct tree_statement_list_node *head; 3328 struct tree_statement_list_node *head;
3377 struct tree_statement_list_node *tail; 3329 struct tree_statement_list_node *tail;
3378 }; 3330 };
3379 3331
3380 3332
3381 /* Optimization options used by a function. */ 3333 /* Optimization options used by a function. */
3382 3334
3383 struct tree_optimization_option GTY(()) 3335 struct GTY(()) tree_optimization_option {
3384 {
3385 struct tree_common common; 3336 struct tree_common common;
3386 3337
3387 /* The optimization options used by the user. */ 3338 /* The optimization options used by the user. */
3388 struct cl_optimization opts; 3339 struct cl_optimization opts;
3389 }; 3340 };
3394 /* Return a tree node that encapsulates the current optimization options. */ 3345 /* Return a tree node that encapsulates the current optimization options. */
3395 extern tree build_optimization_node (void); 3346 extern tree build_optimization_node (void);
3396 3347
3397 /* Target options used by a function. */ 3348 /* Target options used by a function. */
3398 3349
3399 struct tree_target_option GTY(()) 3350 struct GTY(()) tree_target_option {
3400 {
3401 struct tree_common common; 3351 struct tree_common common;
3402 3352
3403 /* The optimization options used by the user. */ 3353 /* The optimization options used by the user. */
3404 struct cl_target_option opts; 3354 struct cl_target_option opts;
3405 }; 3355 };
3413 3363
3414 /* Define the overall contents of a tree node. 3364 /* Define the overall contents of a tree node.
3415 It may be any of the structures declared above 3365 It may be any of the structures declared above
3416 for various types of node. */ 3366 for various types of node. */
3417 3367
3418 union tree_node GTY ((ptr_alias (union lang_tree_node), 3368 union GTY ((ptr_alias (union lang_tree_node),
3419 desc ("tree_node_structure (&%h)"))) 3369 desc ("tree_node_structure (&%h)"))) tree_node {
3420 {
3421 struct tree_base GTY ((tag ("TS_BASE"))) base; 3370 struct tree_base GTY ((tag ("TS_BASE"))) base;
3422 struct tree_common GTY ((tag ("TS_COMMON"))) common; 3371 struct tree_common GTY ((tag ("TS_COMMON"))) common;
3423 struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst; 3372 struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst;
3424 struct tree_real_cst GTY ((tag ("TS_REAL_CST"))) real_cst; 3373 struct tree_real_cst GTY ((tag ("TS_REAL_CST"))) real_cst;
3425 struct tree_fixed_cst GTY ((tag ("TS_FIXED_CST"))) fixed_cst; 3374 struct tree_fixed_cst GTY ((tag ("TS_FIXED_CST"))) fixed_cst;
3447 struct tree_ssa_name GTY ((tag ("TS_SSA_NAME"))) ssa_name; 3396 struct tree_ssa_name GTY ((tag ("TS_SSA_NAME"))) ssa_name;
3448 struct tree_block GTY ((tag ("TS_BLOCK"))) block; 3397 struct tree_block GTY ((tag ("TS_BLOCK"))) block;
3449 struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo; 3398 struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo;
3450 struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list; 3399 struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
3451 struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor; 3400 struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor;
3452 struct tree_memory_tag GTY ((tag ("TS_MEMORY_TAG"))) mtag;
3453 struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause; 3401 struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause;
3454 struct tree_memory_partition_tag GTY ((tag ("TS_MEMORY_PARTITION_TAG"))) mpt;
3455 struct tree_optimization_option GTY ((tag ("TS_OPTIMIZATION"))) optimization; 3402 struct tree_optimization_option GTY ((tag ("TS_OPTIMIZATION"))) optimization;
3456 struct tree_target_option GTY ((tag ("TS_TARGET_OPTION"))) target_option; 3403 struct tree_target_option GTY ((tag ("TS_TARGET_OPTION"))) target_option;
3457 }; 3404 };
3458 3405
3459 /* Standard named or nameless data types of the C compiler. */ 3406 /* Standard named or nameless data types of the C compiler. */
3926 3873
3927 /* Construct various types of nodes. */ 3874 /* Construct various types of nodes. */
3928 3875
3929 extern tree build_nt (enum tree_code, ...); 3876 extern tree build_nt (enum tree_code, ...);
3930 extern tree build_nt_call_list (tree, tree); 3877 extern tree build_nt_call_list (tree, tree);
3878 extern tree build_nt_call_vec (tree, VEC(tree,gc) *);
3931 3879
3932 extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL); 3880 extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL);
3933 #define build0(c,t) build0_stat (c,t MEM_STAT_INFO) 3881 #define build0(c,t) build0_stat (c,t MEM_STAT_INFO)
3934 extern tree build1_stat (enum tree_code, tree, tree MEM_STAT_DECL); 3882 extern tree build1_stat (enum tree_code, tree, tree MEM_STAT_DECL);
3935 #define build1(c,t1,t2) build1_stat (c,t1,t2 MEM_STAT_INFO) 3883 #define build1(c,t1,t2) build1_stat (c,t1,t2 MEM_STAT_INFO)
3941 tree MEM_STAT_DECL); 3889 tree MEM_STAT_DECL);
3942 #define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO) 3890 #define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO)
3943 extern tree build5_stat (enum tree_code, tree, tree, tree, tree, tree, 3891 extern tree build5_stat (enum tree_code, tree, tree, tree, tree, tree,
3944 tree MEM_STAT_DECL); 3892 tree MEM_STAT_DECL);
3945 #define build5(c,t1,t2,t3,t4,t5,t6) build5_stat (c,t1,t2,t3,t4,t5,t6 MEM_STAT_INFO) 3893 #define build5(c,t1,t2,t3,t4,t5,t6) build5_stat (c,t1,t2,t3,t4,t5,t6 MEM_STAT_INFO)
3946 extern tree build7_stat (enum tree_code, tree, tree, tree, tree, tree, 3894 extern tree build6_stat (enum tree_code, tree, tree, tree, tree, tree,
3947 tree, tree, tree MEM_STAT_DECL); 3895 tree, tree MEM_STAT_DECL);
3948 #define build7(c,t1,t2,t3,t4,t5,t6,t7,t8) \ 3896 #define build6(c,t1,t2,t3,t4,t5,t6,t7) \
3949 build7_stat (c,t1,t2,t3,t4,t5,t6,t7,t8 MEM_STAT_INFO) 3897 build6_stat (c,t1,t2,t3,t4,t5,t6,t7 MEM_STAT_INFO)
3898
3899 extern tree build_var_debug_value_stat (tree, tree MEM_STAT_DECL);
3900 #define build_var_debug_value(t1,t2) \
3901 build_var_debug_value_stat (t1,t2 MEM_STAT_INFO)
3950 3902
3951 extern tree build_int_cst (tree, HOST_WIDE_INT); 3903 extern tree build_int_cst (tree, HOST_WIDE_INT);
3952 extern tree build_int_cst_type (tree, HOST_WIDE_INT); 3904 extern tree build_int_cst_type (tree, HOST_WIDE_INT);
3953 extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT); 3905 extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT);
3954 extern tree build_int_cst_wide (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT); 3906 extern tree build_int_cst_wide (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT);
3963 extern tree build_complex (tree, tree, tree); 3915 extern tree build_complex (tree, tree, tree);
3964 extern tree build_one_cst (tree); 3916 extern tree build_one_cst (tree);
3965 extern tree build_string (int, const char *); 3917 extern tree build_string (int, const char *);
3966 extern tree build_tree_list_stat (tree, tree MEM_STAT_DECL); 3918 extern tree build_tree_list_stat (tree, tree MEM_STAT_DECL);
3967 #define build_tree_list(t,q) build_tree_list_stat(t,q MEM_STAT_INFO) 3919 #define build_tree_list(t,q) build_tree_list_stat(t,q MEM_STAT_INFO)
3968 extern tree build_decl_stat (enum tree_code, tree, tree MEM_STAT_DECL); 3920 extern tree build_tree_list_vec_stat (const VEC(tree,gc) * MEM_STAT_DECL);
3921 #define build_tree_list_vec(v) build_tree_list_vec_stat (v MEM_STAT_INFO)
3922 extern tree build_decl_stat (location_t, enum tree_code,
3923 tree, tree MEM_STAT_DECL);
3969 extern tree build_fn_decl (const char *, tree); 3924 extern tree build_fn_decl (const char *, tree);
3970 #define build_decl(c,t,q) build_decl_stat (c,t,q MEM_STAT_INFO) 3925 #define build_decl(l,c,t,q) build_decl_stat (l,c,t,q MEM_STAT_INFO)
3971 extern tree build_block (tree, tree, tree, tree); 3926 extern tree build_block (tree, tree, tree, tree);
3972 extern tree build_empty_stmt (void); 3927 extern tree build_empty_stmt (location_t);
3973 extern tree build_omp_clause (enum omp_clause_code); 3928 extern tree build_omp_clause (location_t, enum omp_clause_code);
3974 3929
3975 extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL); 3930 extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL);
3976 #define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO) 3931 #define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO)
3977 3932
3978 extern tree build_call_list (tree, tree, tree); 3933 extern tree build_call_list (tree, tree, tree);
3979 extern tree build_call_nary (tree, tree, int, ...); 3934 extern tree build_call_nary (tree, tree, int, ...);
3980 extern tree build_call_valist (tree, tree, int, va_list); 3935 extern tree build_call_valist (tree, tree, int, va_list);
3981 extern tree build_call_array (tree, tree, int, tree*); 3936 #define build_call_array(T1,T2,N,T3)\
3937 build_call_array_loc (UNKNOWN_LOCATION, T1, T2, N, T3)
3938 extern tree build_call_array_loc (location_t, tree, tree, int, const tree *);
3939 extern tree build_call_vec (tree, tree, VEC(tree,gc) *);
3982 3940
3983 /* Construct various nodes representing data types. */ 3941 /* Construct various nodes representing data types. */
3984 3942
3985 extern tree make_signed_type (int); 3943 extern tree make_signed_type (int);
3986 extern tree make_unsigned_type (int); 3944 extern tree make_unsigned_type (int);
3994 extern tree build_pointer_type (tree); 3952 extern tree build_pointer_type (tree);
3995 extern tree build_reference_type_for_mode (tree, enum machine_mode, bool); 3953 extern tree build_reference_type_for_mode (tree, enum machine_mode, bool);
3996 extern tree build_reference_type (tree); 3954 extern tree build_reference_type (tree);
3997 extern tree build_vector_type_for_mode (tree, enum machine_mode); 3955 extern tree build_vector_type_for_mode (tree, enum machine_mode);
3998 extern tree build_vector_type (tree innertype, int nunits); 3956 extern tree build_vector_type (tree innertype, int nunits);
3957 extern tree build_opaque_vector_type (tree innertype, int nunits);
3999 extern tree build_type_no_quals (tree); 3958 extern tree build_type_no_quals (tree);
4000 extern tree build_index_type (tree); 3959 extern tree build_index_type (tree);
4001 extern tree build_index_2_type (tree, tree); 3960 extern tree build_index_2_type (tree, tree);
4002 extern tree build_array_type (tree, tree); 3961 extern tree build_array_type (tree, tree);
4003 extern tree build_function_type (tree, tree); 3962 extern tree build_function_type (tree, tree);
4007 extern tree build_varargs_function_type_list (tree, ...); 3966 extern tree build_varargs_function_type_list (tree, ...);
4008 extern tree build_method_type_directly (tree, tree, tree); 3967 extern tree build_method_type_directly (tree, tree, tree);
4009 extern tree build_method_type (tree, tree); 3968 extern tree build_method_type (tree, tree);
4010 extern tree build_offset_type (tree, tree); 3969 extern tree build_offset_type (tree, tree);
4011 extern tree build_complex_type (tree); 3970 extern tree build_complex_type (tree);
4012 extern tree build_resx (int);
4013 extern tree array_type_nelts (const_tree); 3971 extern tree array_type_nelts (const_tree);
4014 extern bool in_array_bounds_p (tree); 3972 extern bool in_array_bounds_p (tree);
4015 extern bool range_in_array_bounds_p (tree); 3973 extern bool range_in_array_bounds_p (tree);
4016 3974
4017 extern tree value_member (tree, tree); 3975 extern tree value_member (tree, tree);
4018 extern tree purpose_member (const_tree, tree); 3976 extern tree purpose_member (const_tree, tree);
3977 extern tree chain_index (int, tree);
4019 3978
4020 #ifndef noCbC 3979 #ifndef noCbC
4021 extern tree build_code_segment_type (tree, tree); 3980 extern tree build_code_segment_type (tree, tree);
4022 #endif 3981 #endif
4023 extern int attribute_list_equal (const_tree, const_tree); 3982 extern int attribute_list_equal (const_tree, const_tree);
4033 extern unsigned int tree_int_cst_min_precision (tree, bool); 3992 extern unsigned int tree_int_cst_min_precision (tree, bool);
4034 extern bool tree_expr_nonnegative_p (tree); 3993 extern bool tree_expr_nonnegative_p (tree);
4035 extern bool tree_expr_nonnegative_warnv_p (tree, bool *); 3994 extern bool tree_expr_nonnegative_warnv_p (tree, bool *);
4036 extern bool may_negate_without_overflow_p (const_tree); 3995 extern bool may_negate_without_overflow_p (const_tree);
4037 extern tree strip_array_types (tree); 3996 extern tree strip_array_types (tree);
3997 extern tree excess_precision_type (tree);
4038 3998
4039 /* Construct various nodes representing fract or accum data types. */ 3999 /* Construct various nodes representing fract or accum data types. */
4040 4000
4041 extern tree make_fract_type (int, int, int); 4001 extern tree make_fract_type (int, int, int);
4042 extern tree make_accum_type (int, int, int); 4002 extern tree make_accum_type (int, int, int);
4079 Such modified types already made are recorded so that duplicates 4039 Such modified types already made are recorded so that duplicates
4080 are not made. */ 4040 are not made. */
4081 4041
4082 extern tree build_type_attribute_variant (tree, tree); 4042 extern tree build_type_attribute_variant (tree, tree);
4083 extern tree build_decl_attribute_variant (tree, tree); 4043 extern tree build_decl_attribute_variant (tree, tree);
4044 extern tree build_type_attribute_qual_variant (tree, tree, int);
4084 4045
4085 /* Structure describing an attribute and a function to handle it. */ 4046 /* Structure describing an attribute and a function to handle it. */
4086 struct attribute_spec 4047 struct attribute_spec
4087 { 4048 {
4088 /* The name of the attribute (without any leading or trailing __), 4049 /* The name of the attribute (without any leading or trailing __),
4304 4265
4305 extern enum machine_mode mode_for_size_tree (const_tree, enum mode_class, int); 4266 extern enum machine_mode mode_for_size_tree (const_tree, enum mode_class, int);
4306 4267
4307 /* Return an expr equal to X but certainly not valid as an lvalue. */ 4268 /* Return an expr equal to X but certainly not valid as an lvalue. */
4308 4269
4309 extern tree non_lvalue (tree); 4270 #define non_lvalue(T) non_lvalue_loc (UNKNOWN_LOCATION, T)
4271 extern tree non_lvalue_loc (location_t, tree);
4310 4272
4311 extern tree convert (tree, tree); 4273 extern tree convert (tree, tree);
4312 extern unsigned int expr_align (const_tree); 4274 extern unsigned int expr_align (const_tree);
4313 extern tree expr_first (tree); 4275 extern tree expr_first (tree);
4314 extern tree expr_last (tree); 4276 extern tree expr_last (tree);
4315 extern tree expr_only (tree);
4316 extern tree size_in_bytes (const_tree); 4277 extern tree size_in_bytes (const_tree);
4317 extern HOST_WIDE_INT int_size_in_bytes (const_tree); 4278 extern HOST_WIDE_INT int_size_in_bytes (const_tree);
4318 extern HOST_WIDE_INT max_int_size_in_bytes (const_tree); 4279 extern HOST_WIDE_INT max_int_size_in_bytes (const_tree);
4280 extern tree tree_expr_size (const_tree);
4319 extern tree bit_position (const_tree); 4281 extern tree bit_position (const_tree);
4320 extern HOST_WIDE_INT int_bit_position (const_tree); 4282 extern HOST_WIDE_INT int_bit_position (const_tree);
4321 extern tree byte_position (const_tree); 4283 extern tree byte_position (const_tree);
4322 extern HOST_WIDE_INT int_byte_position (const_tree); 4284 extern HOST_WIDE_INT int_byte_position (const_tree);
4323 4285
4338 #define bitsizetype sizetype_tab[(int) BITSIZETYPE] 4300 #define bitsizetype sizetype_tab[(int) BITSIZETYPE]
4339 #define ssizetype sizetype_tab[(int) SSIZETYPE] 4301 #define ssizetype sizetype_tab[(int) SSIZETYPE]
4340 #define sbitsizetype sizetype_tab[(int) SBITSIZETYPE] 4302 #define sbitsizetype sizetype_tab[(int) SBITSIZETYPE]
4341 4303
4342 extern tree size_int_kind (HOST_WIDE_INT, enum size_type_kind); 4304 extern tree size_int_kind (HOST_WIDE_INT, enum size_type_kind);
4343 extern tree size_binop (enum tree_code, tree, tree); 4305 #define size_binop(CODE,T1,T2)\
4344 extern tree size_diffop (tree, tree); 4306 size_binop_loc (UNKNOWN_LOCATION, CODE, T1, T2)
4307 extern tree size_binop_loc (location_t, enum tree_code, tree, tree);
4308 #define size_diffop(T1,T2)\
4309 size_diffop_loc (UNKNOWN_LOCATION, T1, T2)
4310 extern tree size_diffop_loc (location_t, tree, tree);
4345 4311
4346 #define size_int(L) size_int_kind (L, SIZETYPE) 4312 #define size_int(L) size_int_kind (L, SIZETYPE)
4347 #define ssize_int(L) size_int_kind (L, SSIZETYPE) 4313 #define ssize_int(L) size_int_kind (L, SSIZETYPE)
4348 #define bitsize_int(L) size_int_kind (L, BITSIZETYPE) 4314 #define bitsize_int(L) size_int_kind (L, BITSIZETYPE)
4349 #define sbitsize_int(L) size_int_kind (L, SBITSIZETYPE) 4315 #define sbitsize_int(L) size_int_kind (L, SBITSIZETYPE)
4350 4316
4351 extern tree round_up (tree, int); 4317 #define round_up(T,N) round_up_loc (UNKNOWN_LOCATION, T, N)
4352 extern tree round_down (tree, int); 4318 extern tree round_up_loc (location_t, tree, int);
4319 #define round_down(T,N) round_down_loc (UNKNOWN_LOCATION, T, N)
4320 extern tree round_down_loc (location_t, tree, int);
4353 extern tree get_pending_sizes (void); 4321 extern tree get_pending_sizes (void);
4354 extern void put_pending_size (tree); 4322 extern void put_pending_size (tree);
4355 extern void put_pending_sizes (tree); 4323 extern void put_pending_sizes (tree);
4324 extern void finalize_size_functions (void);
4356 4325
4357 /* Type for sizes of data-type. */ 4326 /* Type for sizes of data-type. */
4358 4327
4359 #define BITS_PER_UNIT_LOG \ 4328 #define BITS_PER_UNIT_LOG \
4360 ((BITS_PER_UNIT > 1) + (BITS_PER_UNIT > 2) + (BITS_PER_UNIT > 4) \ 4329 ((BITS_PER_UNIT > 1) + (BITS_PER_UNIT > 2) + (BITS_PER_UNIT > 4) \
4400 extern bool initializer_zerop (const_tree); 4369 extern bool initializer_zerop (const_tree);
4401 4370
4402 /* Given a CONSTRUCTOR CTOR, return the elements as a TREE_LIST. */ 4371 /* Given a CONSTRUCTOR CTOR, return the elements as a TREE_LIST. */
4403 4372
4404 extern tree ctor_to_list (tree); 4373 extern tree ctor_to_list (tree);
4374
4375 /* Given a CONSTRUCTOR CTOR, return the element values as a vector. */
4376
4377 extern VEC(tree,gc) *ctor_to_vec (tree);
4405 4378
4406 /* Examine CTOR to discover: 4379 /* Examine CTOR to discover:
4407 * how many scalar fields are set to nonzero values, 4380 * how many scalar fields are set to nonzero values,
4408 and place it in *P_NZ_ELTS; 4381 and place it in *P_NZ_ELTS;
4409 * how many scalar fields in total are in CTOR, 4382 * how many scalar fields in total are in CTOR,
4488 This includes size, bounds, qualifiers (for QUAL_UNION_TYPE) and field 4461 This includes size, bounds, qualifiers (for QUAL_UNION_TYPE) and field
4489 positions. */ 4462 positions. */
4490 4463
4491 extern bool type_contains_placeholder_p (tree); 4464 extern bool type_contains_placeholder_p (tree);
4492 4465
4466 /* Given a tree EXP, find all occurences of references to fields
4467 in a PLACEHOLDER_EXPR and place them in vector REFS without
4468 duplicates. Also record VAR_DECLs and CONST_DECLs. Note that
4469 we assume here that EXP contains only arithmetic expressions
4470 or CALL_EXPRs with PLACEHOLDER_EXPRs occurring only in their
4471 argument list. */
4472
4473 extern void find_placeholder_in_expr (tree, VEC (tree, heap) **);
4474
4475 /* This macro calls the above function but short-circuits the common
4476 case of a constant to save time and also checks for NULL. */
4477
4478 #define FIND_PLACEHOLDER_IN_EXPR(EXP, V) \
4479 do { \
4480 if((EXP) && !TREE_CONSTANT (EXP)) \
4481 find_placeholder_in_expr (EXP, V); \
4482 } while (0)
4483
4493 /* Given a tree EXP, a FIELD_DECL F, and a replacement value R, 4484 /* Given a tree EXP, a FIELD_DECL F, and a replacement value R,
4494 return a tree with all occurrences of references to F in a 4485 return a tree with all occurrences of references to F in a
4495 PLACEHOLDER_EXPR replaced by R. Note that we assume here that EXP 4486 PLACEHOLDER_EXPR replaced by R. Also handle VAR_DECLs and
4496 contains only arithmetic expressions. */ 4487 CONST_DECLs. Note that we assume here that EXP contains only
4488 arithmetic expressions or CALL_EXPRs with PLACEHOLDER_EXPRs
4489 occurring only in their argument list. */
4497 4490
4498 extern tree substitute_in_expr (tree, tree, tree); 4491 extern tree substitute_in_expr (tree, tree, tree);
4499 4492
4500 /* This macro calls the above function but short-circuits the common 4493 /* This macro calls the above function but short-circuits the common
4501 case of a constant to save time and also checks for NULL. */ 4494 case of a constant to save time and also checks for NULL. */
4549 4542
4550 extern tree get_narrower (tree, int *); 4543 extern tree get_narrower (tree, int *);
4551 4544
4552 /* Return true if T is an expression that get_inner_reference handles. */ 4545 /* Return true if T is an expression that get_inner_reference handles. */
4553 4546
4554 extern int handled_component_p (const_tree); 4547 static inline bool
4548 handled_component_p (const_tree t)
4549 {
4550 switch (TREE_CODE (t))
4551 {
4552 case BIT_FIELD_REF:
4553 case COMPONENT_REF:
4554 case ARRAY_REF:
4555 case ARRAY_RANGE_REF:
4556 case VIEW_CONVERT_EXPR:
4557 case REALPART_EXPR:
4558 case IMAGPART_EXPR:
4559 return true;
4560
4561 default:
4562 return false;
4563 }
4564 }
4555 4565
4556 /* Given an expression EXP that is a handled_component_p, 4566 /* Given an expression EXP that is a handled_component_p,
4557 look for the ultimate containing object, which is returned and specify 4567 look for the ultimate containing object, which is returned and specify
4558 the access position and size. */ 4568 the access position and size. */
4559 4569
4687 /* In tree.c */ 4697 /* In tree.c */
4688 extern unsigned crc32_string (unsigned, const char *); 4698 extern unsigned crc32_string (unsigned, const char *);
4689 extern void clean_symbol_name (char *); 4699 extern void clean_symbol_name (char *);
4690 extern tree get_file_function_name (const char *); 4700 extern tree get_file_function_name (const char *);
4691 extern tree get_callee_fndecl (const_tree); 4701 extern tree get_callee_fndecl (const_tree);
4692 extern void change_decl_assembler_name (tree, tree);
4693 extern int type_num_arguments (const_tree); 4702 extern int type_num_arguments (const_tree);
4694 extern bool associative_tree_code (enum tree_code); 4703 extern bool associative_tree_code (enum tree_code);
4695 extern bool commutative_tree_code (enum tree_code); 4704 extern bool commutative_tree_code (enum tree_code);
4696 extern tree upper_bound_in_type (tree, tree); 4705 extern tree upper_bound_in_type (tree, tree);
4697 extern tree lower_bound_in_type (tree, tree); 4706 extern tree lower_bound_in_type (tree, tree);
4698 extern int operand_equal_for_phi_arg_p (const_tree, const_tree); 4707 extern int operand_equal_for_phi_arg_p (const_tree, const_tree);
4699 extern tree call_expr_arg (tree, int); 4708 extern tree call_expr_arg (tree, int);
4700 extern tree *call_expr_argp (tree, int); 4709 extern tree *call_expr_argp (tree, int);
4701 extern tree call_expr_arglist (tree); 4710 extern tree call_expr_arglist (tree);
4702 extern tree create_artificial_label (void); 4711 extern tree create_artificial_label (location_t);
4703 extern const char *get_name (tree); 4712 extern const char *get_name (tree);
4704 extern bool stdarg_p (tree); 4713 extern bool stdarg_p (tree);
4705 extern bool prototype_p (tree); 4714 extern bool prototype_p (tree);
4706 extern int function_args_count (tree);
4707 extern bool auto_var_in_fn_p (const_tree, const_tree); 4715 extern bool auto_var_in_fn_p (const_tree, const_tree);
4716 extern tree build_low_bits_mask (tree, unsigned);
4717 extern tree tree_strip_nop_conversions (tree);
4718 extern tree tree_strip_sign_nop_conversions (tree);
4719 extern tree lhd_gcc_personality (void);
4720
4721 /* In cgraph.c */
4722 extern void change_decl_assembler_name (tree, tree);
4708 4723
4709 /* In gimplify.c */ 4724 /* In gimplify.c */
4710 extern tree unshare_expr (tree); 4725 extern tree unshare_expr (tree);
4711 4726
4712 /* In stmt.c */ 4727 /* In stmt.c */
4738 Acts only on the top level of the expression; 4753 Acts only on the top level of the expression;
4739 if the argument itself cannot be simplified, its 4754 if the argument itself cannot be simplified, its
4740 subexpressions are not changed. */ 4755 subexpressions are not changed. */
4741 4756
4742 extern tree fold (tree); 4757 extern tree fold (tree);
4743 extern tree fold_unary (enum tree_code, tree, tree); 4758 #define fold_unary(CODE,T1,T2)\
4744 extern tree fold_unary_ignore_overflow (enum tree_code, tree, tree); 4759 fold_unary_loc (UNKNOWN_LOCATION, CODE, T1, T2)
4745 extern tree fold_binary (enum tree_code, tree, tree, tree); 4760 extern tree fold_unary_loc (location_t, enum tree_code, tree, tree);
4746 extern tree fold_ternary (enum tree_code, tree, tree, tree, tree); 4761 #define fold_unary_ignore_overflow(CODE,T1,T2)\
4747 extern tree fold_build1_stat (enum tree_code, tree, tree MEM_STAT_DECL); 4762 fold_unary_ignore_overflow_loc (UNKNOWN_LOCATION, CODE, T1, T2)
4748 #define fold_build1(c,t1,t2) fold_build1_stat (c, t1, t2 MEM_STAT_INFO) 4763 extern tree fold_unary_ignore_overflow_loc (location_t, enum tree_code, tree, tree);
4749 extern tree fold_build2_stat (enum tree_code, tree, tree, tree MEM_STAT_DECL); 4764 #define fold_binary(CODE,T1,T2,T3)\
4750 #define fold_build2(c,t1,t2,t3) fold_build2_stat (c, t1, t2, t3 MEM_STAT_INFO) 4765 fold_binary_loc (UNKNOWN_LOCATION, CODE, T1, T2, T3)
4751 extern tree fold_build3_stat (enum tree_code, tree, tree, tree, tree MEM_STAT_DECL); 4766 extern tree fold_binary_loc (location_t, enum tree_code, tree, tree, tree);
4752 #define fold_build3(c,t1,t2,t3,t4) fold_build3_stat (c, t1, t2, t3, t4 MEM_STAT_INFO) 4767 #define fold_ternary(CODE,T1,T2,T3,T4)\
4753 extern tree fold_build1_initializer (enum tree_code, tree, tree); 4768 fold_ternary_loc (UNKNOWN_LOCATION, CODE, T1, T2, T3, T4)
4754 extern tree fold_build2_initializer (enum tree_code, tree, tree, tree); 4769 extern tree fold_ternary_loc (location_t, enum tree_code, tree, tree, tree, tree);
4755 extern tree fold_build3_initializer (enum tree_code, tree, tree, tree, tree); 4770 #define fold_build1(c,t1,t2)\
4756 extern tree fold_build_call_array (tree, tree, int, tree *); 4771 fold_build1_stat_loc (UNKNOWN_LOCATION, c, t1, t2 MEM_STAT_INFO)
4757 extern tree fold_build_call_array_initializer (tree, tree, int, tree *); 4772 #define fold_build1_loc(l,c,t1,t2)\
4773 fold_build1_stat_loc (l, c, t1, t2 MEM_STAT_INFO)
4774 extern tree fold_build1_stat_loc (location_t, enum tree_code, tree,
4775 tree MEM_STAT_DECL);
4776 #define fold_build2(c,t1,t2,t3)\
4777 fold_build2_stat_loc (UNKNOWN_LOCATION, c, t1, t2, t3 MEM_STAT_INFO)
4778 #define fold_build2_loc(l,c,t1,t2,t3)\
4779 fold_build2_stat_loc (l, c, t1, t2, t3 MEM_STAT_INFO)
4780 extern tree fold_build2_stat_loc (location_t, enum tree_code, tree, tree,
4781 tree MEM_STAT_DECL);
4782 #define fold_build3(c,t1,t2,t3,t4)\
4783 fold_build3_stat_loc (UNKNOWN_LOCATION, c, t1, t2, t3, t4 MEM_STAT_INFO)
4784 #define fold_build3_loc(l,c,t1,t2,t3,t4)\
4785 fold_build3_stat_loc (l, c, t1, t2, t3, t4 MEM_STAT_INFO)
4786 extern tree fold_build3_stat_loc (location_t, enum tree_code, tree, tree, tree,
4787 tree MEM_STAT_DECL);
4788 extern tree fold_build1_initializer_loc (location_t, enum tree_code, tree, tree);
4789 extern tree fold_build2_initializer_loc (location_t, enum tree_code, tree, tree, tree);
4790 extern tree fold_build3_initializer_loc (location_t, enum tree_code, tree, tree, tree, tree);
4791 #define fold_build_call_array(T1,T2,N,T4)\
4792 fold_build_call_array_loc (UNKNOWN_LOCATION, T1, T2, N, T4)
4793 extern tree fold_build_call_array_loc (location_t, tree, tree, int, tree *);
4794 #define fold_build_call_array_initializer(T1,T2,N,T4)\
4795 fold_build_call_array_initializer_loc (UNKNOWN_LOCATION, T1, T2, N, T4)
4796 extern tree fold_build_call_array_initializer_loc (location_t, tree, tree, int, tree *);
4758 extern bool fold_convertible_p (const_tree, const_tree); 4797 extern bool fold_convertible_p (const_tree, const_tree);
4759 extern tree fold_convert (tree, tree); 4798 #define fold_convert(T1,T2)\
4760 extern tree fold_single_bit_test (enum tree_code, tree, tree, tree); 4799 fold_convert_loc(UNKNOWN_LOCATION, T1, T2)
4800 extern tree fold_convert_loc (location_t, tree, tree);
4801 extern tree fold_single_bit_test (location_t, enum tree_code, tree, tree, tree);
4761 extern tree fold_ignored_result (tree); 4802 extern tree fold_ignored_result (tree);
4762 extern tree fold_abs_const (tree, tree); 4803 extern tree fold_abs_const (tree, tree);
4763 extern tree fold_indirect_ref_1 (tree, tree); 4804 extern tree fold_indirect_ref_1 (location_t, tree, tree);
4764 extern void fold_defer_overflow_warnings (void); 4805 extern void fold_defer_overflow_warnings (void);
4765 extern void fold_undefer_overflow_warnings (bool, const_gimple, int); 4806 extern void fold_undefer_overflow_warnings (bool, const_gimple, int);
4766 extern void fold_undefer_and_ignore_overflow_warnings (void); 4807 extern void fold_undefer_and_ignore_overflow_warnings (void);
4767 extern bool fold_deferring_overflow_warnings_p (void); 4808 extern bool fold_deferring_overflow_warnings_p (void);
4768 extern tree maybe_fold_offset_to_reference (tree, tree, tree);
4769 extern tree maybe_fold_offset_to_address (tree, tree, tree);
4770 extern tree maybe_fold_stmt_addition (tree, tree, tree);
4771 4809
4772 extern tree force_fit_type_double (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT, 4810 extern tree force_fit_type_double (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT,
4773 int, bool); 4811 int, bool);
4774 4812
4775 extern int fit_double_type (unsigned HOST_WIDE_INT, HOST_WIDE_INT, 4813 extern int fit_double_type (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
4813 OEP_PURE_SAME = 2 4851 OEP_PURE_SAME = 2
4814 }; 4852 };
4815 4853
4816 extern int operand_equal_p (const_tree, const_tree, unsigned int); 4854 extern int operand_equal_p (const_tree, const_tree, unsigned int);
4817 extern int multiple_of_p (tree, const_tree, const_tree); 4855 extern int multiple_of_p (tree, const_tree, const_tree);
4818 extern tree omit_one_operand (tree, tree, tree); 4856 #define omit_one_operand(T1,T2,T3)\
4819 extern tree omit_two_operands (tree, tree, tree, tree); 4857 omit_one_operand_loc (UNKNOWN_LOCATION, T1, T2, T3)
4820 extern tree invert_truthvalue (tree); 4858 extern tree omit_one_operand_loc (location_t, tree, tree, tree);
4821 extern tree fold_truth_not_expr (tree); 4859 #define omit_two_operands(T1,T2,T3,T4)\
4860 omit_two_operands_loc (UNKNOWN_LOCATION, T1, T2, T3, T4)
4861 extern tree omit_two_operands_loc (location_t, tree, tree, tree, tree);
4862 #define invert_truthvalue(T)\
4863 invert_truthvalue_loc(UNKNOWN_LOCATION, T)
4864 extern tree invert_truthvalue_loc (location_t, tree);
4865 extern tree fold_truth_not_expr (location_t, tree);
4822 extern tree fold_unary_to_constant (enum tree_code, tree, tree); 4866 extern tree fold_unary_to_constant (enum tree_code, tree, tree);
4823 extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree); 4867 extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree);
4824 extern tree fold_read_from_constant_string (tree); 4868 extern tree fold_read_from_constant_string (tree);
4825 extern tree int_const_binop (enum tree_code, const_tree, const_tree, int); 4869 extern tree int_const_binop (enum tree_code, const_tree, const_tree, int);
4826 extern tree build_fold_addr_expr (tree); 4870 #define build_fold_addr_expr(T)\
4871 build_fold_addr_expr_loc (UNKNOWN_LOCATION, (T))
4872 extern tree build_fold_addr_expr_loc (location_t, tree);
4873 #define build_fold_addr_expr_with_type(T,TYPE)\
4874 build_fold_addr_expr_with_type_loc (UNKNOWN_LOCATION, (T), TYPE)
4875 extern tree build_fold_addr_expr_with_type_loc (location_t, tree, tree);
4827 extern tree fold_build_cleanup_point_expr (tree type, tree expr); 4876 extern tree fold_build_cleanup_point_expr (tree type, tree expr);
4828 extern tree fold_strip_sign_ops (tree); 4877 extern tree fold_strip_sign_ops (tree);
4829 extern tree build_fold_addr_expr_with_type (tree, tree); 4878 #define build_fold_indirect_ref(T)\
4830 extern tree build_fold_indirect_ref (tree); 4879 build_fold_indirect_ref_loc (UNKNOWN_LOCATION, T)
4831 extern tree fold_indirect_ref (tree); 4880 extern tree build_fold_indirect_ref_loc (location_t, tree);
4881 #define fold_indirect_ref(T)\
4882 fold_indirect_ref_loc (UNKNOWN_LOCATION, T)
4883 extern tree fold_indirect_ref_loc (location_t, tree);
4832 extern tree constant_boolean_node (int, tree); 4884 extern tree constant_boolean_node (int, tree);
4833 extern tree build_low_bits_mask (tree, unsigned); 4885 extern tree div_if_zero_remainder (enum tree_code, const_tree, const_tree);
4834 4886
4835 extern bool tree_swap_operands_p (const_tree, const_tree, bool); 4887 extern bool tree_swap_operands_p (const_tree, const_tree, bool);
4836 extern enum tree_code swap_tree_comparison (enum tree_code); 4888 extern enum tree_code swap_tree_comparison (enum tree_code);
4837 4889
4838 extern bool ptr_difference_const (tree, tree, HOST_WIDE_INT *); 4890 extern bool ptr_difference_const (tree, tree, HOST_WIDE_INT *);
4841 extern bool tree_expr_nonzero_p (tree); 4893 extern bool tree_expr_nonzero_p (tree);
4842 extern bool tree_unary_nonzero_warnv_p (enum tree_code, tree, tree, bool *); 4894 extern bool tree_unary_nonzero_warnv_p (enum tree_code, tree, tree, bool *);
4843 extern bool tree_binary_nonzero_warnv_p (enum tree_code, tree, tree, tree op1, 4895 extern bool tree_binary_nonzero_warnv_p (enum tree_code, tree, tree, tree op1,
4844 bool *); 4896 bool *);
4845 extern bool tree_single_nonzero_warnv_p (tree, bool *); 4897 extern bool tree_single_nonzero_warnv_p (tree, bool *);
4846 extern bool tree_expr_nonzero_warnv_p (tree, bool *);
4847 extern bool tree_unary_nonnegative_warnv_p (enum tree_code, tree, tree, bool *); 4898 extern bool tree_unary_nonnegative_warnv_p (enum tree_code, tree, tree, bool *);
4848 extern bool tree_binary_nonnegative_warnv_p (enum tree_code, tree, tree, tree, 4899 extern bool tree_binary_nonnegative_warnv_p (enum tree_code, tree, tree, tree,
4849 bool *); 4900 bool *);
4850 extern bool tree_single_nonnegative_warnv_p (tree t, bool *strict_overflow_p); 4901 extern bool tree_single_nonnegative_warnv_p (tree t, bool *strict_overflow_p);
4851 extern bool tree_invalid_nonnegative_warnv_p (tree t, bool *strict_overflow_p); 4902 extern bool tree_invalid_nonnegative_warnv_p (tree t, bool *strict_overflow_p);
4852 extern bool tree_call_nonnegative_warnv_p (tree, tree, tree, tree, bool *); 4903 extern bool tree_call_nonnegative_warnv_p (tree, tree, tree, tree, bool *);
4853 4904
4854 extern bool tree_expr_nonzero_warnv_p (tree, bool *); 4905 extern bool tree_expr_nonzero_warnv_p (tree, bool *);
4855 4906
4856 extern bool fold_real_zero_addition_p (const_tree, const_tree, int); 4907 extern bool fold_real_zero_addition_p (const_tree, const_tree, int);
4908 extern tree combine_comparisons (location_t, enum tree_code, enum tree_code,
4909 enum tree_code, tree, tree, tree);
4910 extern void debug_fold_checksum (const_tree);
4857 4911
4858 /* Return nonzero if CODE is a tree code that represents a truth value. */ 4912 /* Return nonzero if CODE is a tree code that represents a truth value. */
4859 static inline bool 4913 static inline bool
4860 truth_value_p (enum tree_code code) 4914 truth_value_p (enum tree_code code)
4861 { 4915 {
4865 || code == TRUTH_XOR_EXPR || code == TRUTH_NOT_EXPR); 4919 || code == TRUTH_XOR_EXPR || code == TRUTH_NOT_EXPR);
4866 } 4920 }
4867 4921
4868 4922
4869 /* In builtins.c */ 4923 /* In builtins.c */
4870 extern tree fold_call_expr (tree, bool); 4924 extern tree fold_call_expr (location_t, tree, bool);
4871 extern tree fold_builtin_fputs (tree, tree, bool, bool, tree); 4925 extern tree fold_builtin_fputs (location_t, tree, tree, bool, bool, tree);
4872 extern tree fold_builtin_strcpy (tree, tree, tree, tree); 4926 extern tree fold_builtin_strcpy (location_t, tree, tree, tree, tree);
4873 extern tree fold_builtin_strncpy (tree, tree, tree, tree, tree); 4927 extern tree fold_builtin_strncpy (location_t, tree, tree, tree, tree, tree);
4874 extern tree fold_builtin_memory_chk (tree, tree, tree, tree, tree, tree, bool, 4928 extern tree fold_builtin_memory_chk (location_t, tree, tree, tree, tree, tree, tree, bool,
4875 enum built_in_function); 4929 enum built_in_function);
4876 extern tree fold_builtin_stxcpy_chk (tree, tree, tree, tree, tree, bool, 4930 extern tree fold_builtin_stxcpy_chk (location_t, tree, tree, tree, tree, tree, bool,
4877 enum built_in_function); 4931 enum built_in_function);
4878 extern tree fold_builtin_strncpy_chk (tree, tree, tree, tree, tree); 4932 extern tree fold_builtin_strncpy_chk (location_t, tree, tree, tree, tree, tree);
4879 extern tree fold_builtin_snprintf_chk (tree, tree, enum built_in_function); 4933 extern tree fold_builtin_snprintf_chk (location_t, tree, tree, enum built_in_function);
4880 extern bool fold_builtin_next_arg (tree, bool); 4934 extern bool fold_builtin_next_arg (tree, bool);
4881 extern enum built_in_function builtin_mathfn_code (const_tree); 4935 extern enum built_in_function builtin_mathfn_code (const_tree);
4882 extern tree build_function_call_expr (tree, tree); 4936 extern tree build_function_call_expr (location_t, tree, tree);
4883 extern tree fold_builtin_call_array (tree, tree, int, tree *); 4937 extern tree fold_builtin_call_array (location_t, tree, tree, int, tree *);
4884 extern void debug_fold_checksum (const_tree); 4938 #define build_call_expr(...)\
4885 extern tree build_call_expr (tree, int, ...); 4939 build_call_expr_loc (UNKNOWN_LOCATION, __VA_ARGS__)
4940 extern tree build_call_expr_loc (location_t, tree, int, ...);
4886 extern tree mathfn_built_in (tree, enum built_in_function fn); 4941 extern tree mathfn_built_in (tree, enum built_in_function fn);
4887 extern tree strip_float_extensions (tree);
4888 extern tree c_strlen (tree, int); 4942 extern tree c_strlen (tree, int);
4889 extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *); 4943 extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
4890 extern tree build_va_arg_indirect_ref (tree); 4944 extern tree build_va_arg_indirect_ref (tree);
4891 extern tree build_string_literal (int, const char *); 4945 extern tree build_string_literal (int, const char *);
4892 extern bool validate_arglist (const_tree, ...); 4946 extern bool validate_arglist (const_tree, ...);
4893 extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode); 4947 extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode);
4948 extern bool can_trust_pointer_alignment (void);
4894 extern int get_pointer_alignment (tree, unsigned int); 4949 extern int get_pointer_alignment (tree, unsigned int);
4950 extern bool is_builtin_name (const char *);
4951 extern bool is_builtin_fn (tree);
4895 extern int get_object_alignment (tree, unsigned int, unsigned int); 4952 extern int get_object_alignment (tree, unsigned int, unsigned int);
4896 extern tree fold_call_stmt (gimple, bool); 4953 extern tree fold_call_stmt (gimple, bool);
4897 extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function); 4954 extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function);
4955 extern tree make_range (tree, int *, tree *, tree *, bool *);
4956 extern tree build_range_check (location_t, tree, tree, int, tree, tree);
4957 extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int,
4958 tree, tree);
4959 extern void set_builtin_user_assembler_name (tree decl, const char *asmspec);
4898 4960
4899 /* In convert.c */ 4961 /* In convert.c */
4900 extern tree strip_float_extensions (tree); 4962 extern tree strip_float_extensions (tree);
4901 4963
4902 /* In tree.c */ 4964 /* In tree.c */
4912 extern int tree_floor_log2 (const_tree); 4974 extern int tree_floor_log2 (const_tree);
4913 extern int simple_cst_equal (const_tree, const_tree); 4975 extern int simple_cst_equal (const_tree, const_tree);
4914 extern hashval_t iterative_hash_expr (const_tree, hashval_t); 4976 extern hashval_t iterative_hash_expr (const_tree, hashval_t);
4915 extern hashval_t iterative_hash_exprs_commutative (const_tree, 4977 extern hashval_t iterative_hash_exprs_commutative (const_tree,
4916 const_tree, hashval_t); 4978 const_tree, hashval_t);
4979 extern hashval_t iterative_hash_host_wide_int (HOST_WIDE_INT, hashval_t);
4917 extern hashval_t iterative_hash_hashval_t (hashval_t, hashval_t); 4980 extern hashval_t iterative_hash_hashval_t (hashval_t, hashval_t);
4981 extern hashval_t iterative_hash_host_wide_int (HOST_WIDE_INT, hashval_t);
4918 extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT); 4982 extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT);
4919 extern int type_list_equal (const_tree, const_tree); 4983 extern int type_list_equal (const_tree, const_tree);
4920 extern int chain_member (const_tree, const_tree); 4984 extern int chain_member (const_tree, const_tree);
4921 extern tree type_hash_lookup (unsigned int, tree); 4985 extern tree type_hash_lookup (unsigned int, tree);
4922 extern void type_hash_add (unsigned int, tree); 4986 extern void type_hash_add (unsigned int, tree);
4923 extern int simple_cst_list_equal (const_tree, const_tree); 4987 extern int simple_cst_list_equal (const_tree, const_tree);
4924 extern void dump_tree_statistics (void); 4988 extern void dump_tree_statistics (void);
4925 extern void expand_function_end (void);
4926 extern void expand_function_start (tree);
4927 extern void stack_protect_prologue (void);
4928 extern void stack_protect_epilogue (void);
4929 extern void recompute_tree_invariant_for_addr_expr (tree); 4989 extern void recompute_tree_invariant_for_addr_expr (tree);
4930 extern bool needs_to_live_in_memory (const_tree); 4990 extern bool needs_to_live_in_memory (const_tree);
4931 extern tree reconstruct_complex_type (tree, tree); 4991 extern tree reconstruct_complex_type (tree, tree);
4932 4992
4933 extern int real_onep (const_tree); 4993 extern int real_onep (const_tree);
4937 extern void build_common_tree_nodes (bool, bool); 4997 extern void build_common_tree_nodes (bool, bool);
4938 extern void build_common_tree_nodes_2 (int); 4998 extern void build_common_tree_nodes_2 (int);
4939 extern void build_common_builtin_nodes (void); 4999 extern void build_common_builtin_nodes (void);
4940 extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int); 5000 extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int);
4941 extern tree build_range_type (tree, tree, tree); 5001 extern tree build_range_type (tree, tree, tree);
5002 extern bool subrange_type_for_debug_p (const_tree, tree *, tree *);
4942 extern HOST_WIDE_INT int_cst_value (const_tree); 5003 extern HOST_WIDE_INT int_cst_value (const_tree);
4943 extern tree build_addr (tree, tree); 5004 extern HOST_WIDEST_INT widest_int_cst_value (const_tree);
4944 5005
4945 extern bool fields_compatible_p (const_tree, const_tree); 5006 extern bool fields_compatible_p (const_tree, const_tree);
4946 extern tree find_compatible_field (tree, tree); 5007 extern tree find_compatible_field (tree, tree);
4947
4948 extern void set_expr_locus (tree, source_location *);
4949 5008
4950 extern tree *tree_block (tree); 5009 extern tree *tree_block (tree);
4951 extern location_t *block_nonartificial_location (tree); 5010 extern location_t *block_nonartificial_location (tree);
4952 extern location_t tree_nonartificial_location (tree); 5011 extern location_t tree_nonartificial_location (tree);
4953 5012
5013 extern tree block_ultimate_origin (const_tree);
5014
5015 /* In tree-nested.c */
5016 extern tree build_addr (tree, tree);
5017
4954 /* In function.c */ 5018 /* In function.c */
4955 extern void expand_main_function (void); 5019 extern void expand_main_function (void);
5020 extern void expand_function_end (void);
5021 extern void expand_function_start (tree);
5022 extern void stack_protect_prologue (void);
5023 extern void stack_protect_epilogue (void);
4956 extern void init_dummy_function_start (void); 5024 extern void init_dummy_function_start (void);
4957 extern void expand_dummy_function_end (void); 5025 extern void expand_dummy_function_end (void);
4958 extern unsigned int init_function_for_compilation (void); 5026 extern unsigned int init_function_for_compilation (void);
4959 extern void allocate_struct_function (tree, bool); 5027 extern void allocate_struct_function (tree, bool);
4960 extern void push_struct_function (tree fndecl); 5028 extern void push_struct_function (tree fndecl);
5029 extern int setjmp_call_p (const_tree); 5097 extern int setjmp_call_p (const_tree);
5030 extern bool gimple_alloca_call_p (const_gimple); 5098 extern bool gimple_alloca_call_p (const_gimple);
5031 extern bool alloca_call_p (const_tree); 5099 extern bool alloca_call_p (const_tree);
5032 extern bool must_pass_in_stack_var_size (enum machine_mode, const_tree); 5100 extern bool must_pass_in_stack_var_size (enum machine_mode, const_tree);
5033 extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree); 5101 extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree);
5034 extern tree block_ultimate_origin (const_tree);
5035 5102
5036 /* In attribs.c. */ 5103 /* In attribs.c. */
5037 5104
5038 extern const struct attribute_spec *lookup_attribute_spec (tree); 5105 extern const struct attribute_spec *lookup_attribute_spec (tree);
5039 5106
5057 extern void internal_reference_types (void); 5124 extern void internal_reference_types (void);
5058 extern unsigned int update_alignment_for_field (record_layout_info, tree, 5125 extern unsigned int update_alignment_for_field (record_layout_info, tree,
5059 unsigned int); 5126 unsigned int);
5060 /* varasm.c */ 5127 /* varasm.c */
5061 extern void make_decl_rtl (tree); 5128 extern void make_decl_rtl (tree);
5062 extern void make_decl_one_only (tree); 5129 extern void make_decl_one_only (tree, tree);
5063 extern int supports_one_only (void); 5130 extern int supports_one_only (void);
5064 extern void resolve_unique_section (tree, int, int); 5131 extern void resolve_unique_section (tree, int, int);
5065 extern void mark_referenced (tree); 5132 extern void mark_referenced (tree);
5066 extern void mark_decl_referenced (tree); 5133 extern void mark_decl_referenced (tree);
5067 extern void notice_global_symbol (tree); 5134 extern void notice_global_symbol (tree);
5068 extern void set_user_assembler_name (tree, const char *); 5135 extern void set_user_assembler_name (tree, const char *);
5069 extern void process_pending_assemble_externals (void); 5136 extern void process_pending_assemble_externals (void);
5070 extern void finish_aliases_1 (void); 5137 extern void finish_aliases_1 (void);
5071 extern void finish_aliases_2 (void); 5138 extern void finish_aliases_2 (void);
5072 extern tree emutls_decl (tree); 5139 extern tree emutls_decl (tree);
5140 extern void remove_unreachable_alias_pairs (void);
5073 5141
5074 /* In stmt.c */ 5142 /* In stmt.c */
5075 extern void expand_computed_goto (tree); 5143 extern void expand_computed_goto (tree);
5076 extern bool parse_output_constraint (const char **, int, int, int, 5144 extern bool parse_output_constraint (const char **, int, int, int,
5077 bool *, bool *, bool *); 5145 bool *, bool *, bool *);
5078 extern bool parse_input_constraint (const char **, int, int, int, int, 5146 extern bool parse_input_constraint (const char **, int, int, int, int,
5079 const char * const *, bool *, bool *); 5147 const char * const *, bool *, bool *);
5080 extern void expand_asm_expr (tree); 5148 extern void expand_asm_stmt (gimple);
5081 extern tree resolve_asm_operand_names (tree, tree, tree); 5149 extern tree resolve_asm_operand_names (tree, tree, tree, tree);
5082 extern void expand_case (tree); 5150 extern void expand_case (gimple);
5083 extern void expand_decl (tree); 5151 extern void expand_decl (tree);
5084 #ifdef HARD_CONST 5152 #ifdef HARD_CONST
5085 /* Silly ifdef to avoid having all includers depend on hard-reg-set.h. */ 5153 /* Silly ifdef to avoid having all includers depend on hard-reg-set.h. */
5086 extern tree tree_overlaps_hard_reg_set (tree, HARD_REG_SET *); 5154 extern tree tree_overlaps_hard_reg_set (tree, HARD_REG_SET *);
5087 #endif 5155 #endif
5088 5156
5089 5157
5158 /* In dwarf2out.c */
5090 /* Interface of the DWARF2 unwind info support. */ 5159 /* Interface of the DWARF2 unwind info support. */
5091 5160
5092 /* Generate a new label for the CFI info to refer to. */ 5161 /* Generate a new label for the CFI info to refer to. */
5093 5162
5094 extern char *dwarf2out_cfi_label (bool); 5163 extern char *dwarf2out_cfi_label (bool);
5098 extern void dwarf2out_def_cfa (const char *, unsigned, HOST_WIDE_INT); 5167 extern void dwarf2out_def_cfa (const char *, unsigned, HOST_WIDE_INT);
5099 5168
5100 /* Add the CFI for saving a register window. */ 5169 /* Add the CFI for saving a register window. */
5101 5170
5102 extern void dwarf2out_window_save (const char *); 5171 extern void dwarf2out_window_save (const char *);
5103
5104 /* Add a CFI to update the running total of the size of arguments pushed
5105 onto the stack. */
5106
5107 extern void dwarf2out_args_size (const char *, HOST_WIDE_INT);
5108 5172
5109 /* Entry point for saving a register to the stack. */ 5173 /* Entry point for saving a register to the stack. */
5110 5174
5111 extern void dwarf2out_reg_save (const char *, unsigned, HOST_WIDE_INT); 5175 extern void dwarf2out_reg_save (const char *, unsigned, HOST_WIDE_INT);
5112 5176
5144 #define walk_tree(a,b,c,d) \ 5208 #define walk_tree(a,b,c,d) \
5145 walk_tree_1 (a, b, c, d, NULL) 5209 walk_tree_1 (a, b, c, d, NULL)
5146 #define walk_tree_without_duplicates(a,b,c) \ 5210 #define walk_tree_without_duplicates(a,b,c) \
5147 walk_tree_without_duplicates_1 (a, b, c, NULL) 5211 walk_tree_without_duplicates_1 (a, b, c, NULL)
5148 5212
5213 /* In emit-rtl.c */
5149 /* Assign the RTX to declaration. */ 5214 /* Assign the RTX to declaration. */
5150 5215
5151 extern void set_decl_rtl (tree, rtx); 5216 extern void set_decl_rtl (tree, rtx);
5152 extern void set_decl_incoming_rtl (tree, rtx, bool); 5217 extern void set_decl_incoming_rtl (tree, rtx, bool);
5153 5218
5182 /* True if we are in gimple form and the actions of the folders need to 5247 /* True if we are in gimple form and the actions of the folders need to
5183 be restricted. False if we are not in gimple form and folding is not 5248 be restricted. False if we are not in gimple form and folding is not
5184 restricted to creating gimple expressions. */ 5249 restricted to creating gimple expressions. */
5185 extern bool in_gimple_form; 5250 extern bool in_gimple_form;
5186 5251
5187 /* In tree-gimple.c. */ 5252 /* In gimple.c. */
5188 extern tree get_base_address (tree t); 5253 extern tree get_base_address (tree t);
5254 extern void mark_addressable (tree);
5189 5255
5190 /* In tree-vectorizer.c. */ 5256 /* In tree-vectorizer.c. */
5191 extern void vect_set_verbosity_level (const char *); 5257 extern void vect_set_verbosity_level (const char *);
5192 5258
5193 /* In tree.c. */ 5259 /* In tree.c. */
5194 5260
5195 struct tree_map_base GTY(()) 5261 struct GTY(()) tree_map_base {
5196 {
5197 tree from; 5262 tree from;
5198 }; 5263 };
5199 5264
5200 extern int tree_map_base_eq (const void *, const void *); 5265 extern int tree_map_base_eq (const void *, const void *);
5201 extern unsigned int tree_map_base_hash (const void *); 5266 extern unsigned int tree_map_base_hash (const void *);
5202 extern int tree_map_base_marked_p (const void *); 5267 extern int tree_map_base_marked_p (const void *);
5268 extern bool list_equal_p (const_tree, const_tree);
5203 5269
5204 /* Map from a tree to another tree. */ 5270 /* Map from a tree to another tree. */
5205 5271
5206 struct tree_map GTY(()) 5272 struct GTY(()) tree_map {
5207 {
5208 struct tree_map_base base; 5273 struct tree_map_base base;
5209 unsigned int hash; 5274 unsigned int hash;
5210 tree to; 5275 tree to;
5211 }; 5276 };
5212 5277
5214 extern unsigned int tree_map_hash (const void *); 5279 extern unsigned int tree_map_hash (const void *);
5215 #define tree_map_marked_p tree_map_base_marked_p 5280 #define tree_map_marked_p tree_map_base_marked_p
5216 5281
5217 /* Map from a tree to an int. */ 5282 /* Map from a tree to an int. */
5218 5283
5219 struct tree_int_map GTY(()) 5284 struct GTY(()) tree_int_map {
5220 {
5221 struct tree_map_base base; 5285 struct tree_map_base base;
5222 unsigned int to; 5286 unsigned int to;
5223 }; 5287 };
5224 5288
5225 #define tree_int_map_eq tree_map_base_eq 5289 #define tree_int_map_eq tree_map_base_eq
5226 #define tree_int_map_hash tree_map_base_hash 5290 #define tree_int_map_hash tree_map_base_hash
5227 #define tree_int_map_marked_p tree_map_base_marked_p 5291 #define tree_int_map_marked_p tree_map_base_marked_p
5228 5292
5229 /* Map from a tree to initialization/finalization priorities. */ 5293 /* Map from a tree to initialization/finalization priorities. */
5230 5294
5231 struct tree_priority_map GTY(()) 5295 struct GTY(()) tree_priority_map {
5232 {
5233 struct tree_map_base base; 5296 struct tree_map_base base;
5234 priority_type init; 5297 priority_type init;
5235 priority_type fini; 5298 priority_type fini;
5236 }; 5299 };
5237 5300
5238 #define tree_priority_map_eq tree_map_base_eq 5301 #define tree_priority_map_eq tree_map_base_eq
5239 #define tree_priority_map_hash tree_map_base_hash 5302 #define tree_priority_map_hash tree_map_base_hash
5240 #define tree_priority_map_marked_p tree_map_base_marked_p 5303 #define tree_priority_map_marked_p tree_map_base_marked_p
5241 5304
5305 /* In tree-ssa.c */
5306
5307 tree target_for_debug_bind (tree);
5308
5309 /* In tree-ssa-ccp.c */
5310 extern tree maybe_fold_offset_to_reference (location_t, tree, tree, tree);
5311 extern tree maybe_fold_offset_to_address (location_t, tree, tree, tree);
5312 extern tree maybe_fold_stmt_addition (location_t, tree, tree, tree);
5313
5242 /* In tree-ssa-address.c. */ 5314 /* In tree-ssa-address.c. */
5243 extern tree tree_mem_ref_addr (tree, tree); 5315 extern tree tree_mem_ref_addr (tree, tree);
5244 extern void copy_mem_ref_info (tree, tree); 5316 extern void copy_mem_ref_info (tree, tree);
5245 5317
5246 /* In tree-vrp.c */ 5318 /* In tree-vrp.c */
5247 extern bool ssa_name_nonzero_p (const_tree);
5248 extern bool ssa_name_nonnegative_p (const_tree); 5319 extern bool ssa_name_nonnegative_p (const_tree);
5249 5320
5250 /* In tree-object-size.c. */ 5321 /* In tree-object-size.c. */
5251 extern void init_object_sizes (void); 5322 extern void init_object_sizes (void);
5252 extern void fini_object_sizes (void); 5323 extern void fini_object_sizes (void);
5253 extern unsigned HOST_WIDE_INT compute_builtin_object_size (tree, int); 5324 extern unsigned HOST_WIDE_INT compute_builtin_object_size (tree, int);
5254 5325
5255 /* In expr.c. */ 5326 /* In expr.c. */
5256 extern unsigned HOST_WIDE_INT highest_pow2_factor (const_tree); 5327 extern unsigned HOST_WIDE_INT highest_pow2_factor (const_tree);
5328 extern tree build_personality_function (const char *);
5257 5329
5258 /* In tree-inline.c. */ 5330 /* In tree-inline.c. */
5259 5331
5260 void init_inline_once (void); 5332 void init_inline_once (void);
5261 5333
5262 /* In ipa-reference.c. Used for parsing attributes of asm code. */ 5334 /* In ipa-reference.c. Used for parsing attributes of asm code. */
5263 extern GTY(()) tree memory_identifier_string; 5335 extern GTY(()) tree memory_identifier_string;
5264 5336
5265 /* Compute the number of operands in an expression node NODE. For 5337 /* Compute the number of operands in an expression node NODE. For
5266 tcc_vl_exp nodes like CALL_EXPRs, this is stored in the node itself, 5338 tcc_vl_exp nodes like CALL_EXPRs, this is stored in the node itself,
5267 otherwise it is looked up from the node's code. */ 5339 otherwise it is looked up from the node's code. */
5268 static inline int 5340 static inline int
5269 tree_operand_length (const_tree node) 5341 tree_operand_length (const_tree node)
5270 { 5342 {
5277 /* Abstract iterators for CALL_EXPRs. These static inline definitions 5349 /* Abstract iterators for CALL_EXPRs. These static inline definitions
5278 have to go towards the end of tree.h so that union tree_node is fully 5350 have to go towards the end of tree.h so that union tree_node is fully
5279 defined by this point. */ 5351 defined by this point. */
5280 5352
5281 /* Structure containing iterator state. */ 5353 /* Structure containing iterator state. */
5282 typedef struct call_expr_arg_iterator_d GTY (()) 5354 typedef struct GTY (()) call_expr_arg_iterator_d {
5283 {
5284 tree t; /* the call_expr */ 5355 tree t; /* the call_expr */
5285 int n; /* argument count */ 5356 int n; /* argument count */
5286 int i; /* next argument index */ 5357 int i; /* next argument index */
5287 } call_expr_arg_iterator; 5358 } call_expr_arg_iterator;
5288 5359
5289 typedef struct const_call_expr_arg_iterator_d GTY (()) 5360 typedef struct GTY (()) const_call_expr_arg_iterator_d {
5290 {
5291 const_tree t; /* the call_expr */ 5361 const_tree t; /* the call_expr */
5292 int n; /* argument count */ 5362 int n; /* argument count */
5293 int i; /* next argument index */ 5363 int i; /* next argument index */
5294 } const_call_expr_arg_iterator; 5364 } const_call_expr_arg_iterator;
5295 5365
5375 5445
5376 #define FOR_EACH_CONST_CALL_EXPR_ARG(arg, iter, call) \ 5446 #define FOR_EACH_CONST_CALL_EXPR_ARG(arg, iter, call) \
5377 for ((arg) = first_const_call_expr_arg ((call), &(iter)); (arg); \ 5447 for ((arg) = first_const_call_expr_arg ((call), &(iter)); (arg); \
5378 (arg) = next_const_call_expr_arg (&(iter))) 5448 (arg) = next_const_call_expr_arg (&(iter)))
5379 5449
5450 /* Return true if tree node T is a language-specific node. */
5451 static inline bool
5452 is_lang_specific (tree t)
5453 {
5454 return TREE_CODE (t) == LANG_TYPE || TREE_CODE (t) >= NUM_TREE_CODES;
5455 }
5456
5380 #endif /* GCC_TREE_H */ 5457 #endif /* GCC_TREE_H */