00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef GCC_TREE_H
00027 #define GCC_TREE_H
00028
00029 #include "machmode.h"
00030 #include "input.h"
00031 #include "statistics.h"
00032 #include "vec.h"
00033
00034
00035
00036 #define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM,
00037
00038 enum tree_code {
00039 #include "tree.def"
00040
00041 LAST_AND_UNUSED_TREE_CODE
00042
00043 };
00044
00045 #undef DEFTREECODE
00046
00047
00048 #define NUM_TREE_CODES ((int) LAST_AND_UNUSED_TREE_CODE)
00049
00050
00051
00052
00053
00054
00055 enum tree_code_class {
00056 tcc_exceptional,
00057 tcc_constant,
00058
00059 tcc_type,
00060 tcc_declaration,
00061 tcc_reference,
00062 tcc_comparison,
00063 tcc_unary,
00064 tcc_binary,
00065 tcc_statement,
00066
00067 tcc_expression
00068 };
00069
00070
00071
00072
00073 extern const char *const tree_code_class_strings[];
00074
00075
00076
00077 #define TREE_CODE_CLASS_STRING(CLASS)\
00078 tree_code_class_strings[(int) (CLASS)]
00079
00080 #define MAX_TREE_CODES 256
00081 extern const enum tree_code_class tree_code_type[];
00082 #define TREE_CODE_CLASS(CODE) tree_code_type[(int) (CODE)]
00083
00084
00085
00086 #define EXCEPTIONAL_CLASS_P(CODE)\
00087 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_exceptional)
00088
00089
00090
00091 #define CONSTANT_CLASS_P(CODE)\
00092 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_constant)
00093
00094
00095
00096 #define TYPE_P(CODE)\
00097 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_type)
00098
00099
00100
00101 #define DECL_P(CODE)\
00102 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_declaration)
00103
00104
00105
00106 #define INDIRECT_REF_P(CODE)\
00107 (TREE_CODE (CODE) == INDIRECT_REF \
00108 || TREE_CODE (CODE) == ALIGN_INDIRECT_REF \
00109 || TREE_CODE (CODE) == MISALIGNED_INDIRECT_REF)
00110
00111
00112
00113 #define REFERENCE_CLASS_P(CODE)\
00114 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_reference)
00115
00116
00117
00118 #define COMPARISON_CLASS_P(CODE)\
00119 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_comparison)
00120
00121
00122
00123 #define UNARY_CLASS_P(CODE)\
00124 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_unary)
00125
00126
00127
00128 #define BINARY_CLASS_P(CODE)\
00129 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_binary)
00130
00131
00132
00133 #define STATEMENT_CLASS_P(CODE)\
00134 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_statement)
00135
00136
00137
00138 #define EXPRESSION_CLASS_P(CODE)\
00139 (TREE_CODE_CLASS (TREE_CODE (CODE)) == tcc_expression)
00140
00141
00142
00143 #define IS_NON_TYPE_CODE_CLASS(CLASS) ((CLASS) != tcc_type)
00144
00145
00146
00147 #define IS_TYPE_OR_DECL_P(CODE)\
00148 (TYPE_P (CODE) || DECL_P (CODE))
00149
00150
00151
00152
00153 #define IS_EXPR_CODE_CLASS(CLASS)\
00154 ((CLASS) >= tcc_reference && (CLASS) <= tcc_expression)
00155
00156
00157
00158 #define EXPR_P(NODE) IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (NODE)))
00159
00160
00161
00162 extern const unsigned char tree_code_length[];
00163 #define TREE_CODE_LENGTH(CODE) tree_code_length[(int) (CODE)]
00164
00165
00166
00167 extern const char *const tree_code_name[];
00168
00169
00170 DEF_VEC_GC_P(tree);
00171
00172
00173
00174
00175 enum built_in_class
00176 {
00177 NOT_BUILT_IN = 0,
00178 BUILT_IN_FRONTEND,
00179 BUILT_IN_MD,
00180 BUILT_IN_NORMAL
00181 };
00182
00183
00184 extern const char *const built_in_class_names[4];
00185
00186
00187
00188
00189 #define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) ENUM,
00190 enum built_in_function
00191 {
00192 #include "builtins.def"
00193
00194
00195
00196 BUILT_IN_COMPLEX_MUL_MIN,
00197 BUILT_IN_COMPLEX_MUL_MAX
00198 = BUILT_IN_COMPLEX_MUL_MIN
00199 + MAX_MODE_COMPLEX_FLOAT
00200 - MIN_MODE_COMPLEX_FLOAT,
00201
00202 BUILT_IN_COMPLEX_DIV_MIN,
00203 BUILT_IN_COMPLEX_DIV_MAX
00204 = BUILT_IN_COMPLEX_DIV_MIN
00205 + MAX_MODE_COMPLEX_FLOAT
00206 - MIN_MODE_COMPLEX_FLOAT,
00207
00208
00209 END_BUILTINS
00210 };
00211 #undef DEF_BUILTIN
00212
00213
00214 extern const char * built_in_names[(int) END_BUILTINS];
00215
00216
00217
00218 #define BUILTIN_EXP10_P(FN) \
00219 ((FN) == BUILT_IN_EXP10 || (FN) == BUILT_IN_EXP10F || (FN) == BUILT_IN_EXP10L \
00220 || (FN) == BUILT_IN_POW10 || (FN) == BUILT_IN_POW10F || (FN) == BUILT_IN_POW10L)
00221
00222 #define BUILTIN_EXPONENT_P(FN) (BUILTIN_EXP10_P (FN) \
00223 || (FN) == BUILT_IN_EXP || (FN) == BUILT_IN_EXPF || (FN) == BUILT_IN_EXPL \
00224 || (FN) == BUILT_IN_EXP2 || (FN) == BUILT_IN_EXP2F || (FN) == BUILT_IN_EXP2L)
00225
00226 #define BUILTIN_SQRT_P(FN) \
00227 ((FN) == BUILT_IN_SQRT || (FN) == BUILT_IN_SQRTF || (FN) == BUILT_IN_SQRTL)
00228
00229 #define BUILTIN_CBRT_P(FN) \
00230 ((FN) == BUILT_IN_CBRT || (FN) == BUILT_IN_CBRTF || (FN) == BUILT_IN_CBRTL)
00231
00232 #define BUILTIN_ROOT_P(FN) (BUILTIN_SQRT_P (FN) || BUILTIN_CBRT_P (FN))
00233
00234
00235 extern GTY(()) tree built_in_decls[(int) END_BUILTINS];
00236 extern GTY(()) tree implicit_built_in_decls[(int) END_BUILTINS];
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259 union tree_ann_d;
00260
00261 struct tree_common GTY(())
00262 {
00263 tree chain;
00264 tree type;
00265 union tree_ann_d *ann;
00266
00267 ENUM_BITFIELD(tree_code) code : 8;
00268
00269 unsigned side_effects_flag : 1;
00270 unsigned constant_flag : 1;
00271 unsigned addressable_flag : 1;
00272 unsigned volatile_flag : 1;
00273 unsigned readonly_flag : 1;
00274 unsigned unsigned_flag : 1;
00275 unsigned asm_written_flag: 1;
00276 unsigned nowarning_flag : 1;
00277
00278 unsigned used_flag : 1;
00279 unsigned nothrow_flag : 1;
00280 unsigned static_flag : 1;
00281 unsigned public_flag : 1;
00282 unsigned private_flag : 1;
00283 unsigned protected_flag : 1;
00284 unsigned deprecated_flag : 1;
00285 unsigned invariant_flag : 1;
00286
00287 unsigned lang_flag_0 : 1;
00288 unsigned lang_flag_1 : 1;
00289 unsigned lang_flag_2 : 1;
00290 unsigned lang_flag_3 : 1;
00291 unsigned lang_flag_4 : 1;
00292 unsigned lang_flag_5 : 1;
00293 unsigned lang_flag_6 : 1;
00294 unsigned visited : 1;
00295
00296 unsigned int emitted : 1;
00297 unsigned int not_emitted_by_gxx : 1;
00298
00299
00300
00301 unsigned int emit_target_expr_cleanup : 1;
00302
00303 unsigned int dwarf_access : 2;
00304
00305 unsigned int fully_translated_to_gs : 1;
00306
00307 unsigned long translated_gs_node;
00308 HOST_WIDE_INT gs_sequence_num;
00309 };
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462 #define TREE_CODE(NODE) ((enum tree_code) (NODE)->common.code)
00463 #define TREE_SET_CODE(NODE, VALUE) ((NODE)->common.code = (VALUE))
00464
00465
00466
00467 #if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
00468
00469 #define TREE_CHECK(T, CODE) __extension__ \
00470 ({ const tree __t = (T); \
00471 if (TREE_CODE (__t) != (CODE)) \
00472 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00473 (CODE), 0); \
00474 __t; })
00475
00476 #define TREE_NOT_CHECK(T, CODE) __extension__ \
00477 ({ const tree __t = (T); \
00478 if (TREE_CODE (__t) == (CODE)) \
00479 tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00480 (CODE), 0); \
00481 __t; })
00482
00483 #define TREE_CHECK2(T, CODE1, CODE2) __extension__ \
00484 ({ const tree __t = (T); \
00485 if (TREE_CODE (__t) != (CODE1) \
00486 && TREE_CODE (__t) != (CODE2)) \
00487 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00488 (CODE1), (CODE2), 0); \
00489 __t; })
00490
00491 #define TREE_NOT_CHECK2(T, CODE1, CODE2) __extension__ \
00492 ({ const tree __t = (T); \
00493 if (TREE_CODE (__t) == (CODE1) \
00494 || TREE_CODE (__t) == (CODE2)) \
00495 tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00496 (CODE1), (CODE2), 0); \
00497 __t; })
00498
00499 #define TREE_CHECK3(T, CODE1, CODE2, CODE3) __extension__ \
00500 ({ const tree __t = (T); \
00501 if (TREE_CODE (__t) != (CODE1) \
00502 && TREE_CODE (__t) != (CODE2) \
00503 && TREE_CODE (__t) != (CODE3)) \
00504 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00505 (CODE1), (CODE2), (CODE3), 0); \
00506 __t; })
00507
00508 #define TREE_NOT_CHECK3(T, CODE1, CODE2, CODE3) __extension__ \
00509 ({ const tree __t = (T); \
00510 if (TREE_CODE (__t) == (CODE1) \
00511 || TREE_CODE (__t) == (CODE2) \
00512 || TREE_CODE (__t) == (CODE3)) \
00513 tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00514 (CODE1), (CODE2), (CODE3), 0); \
00515 __t; })
00516
00517 #define TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) __extension__ \
00518 ({ const tree __t = (T); \
00519 if (TREE_CODE (__t) != (CODE1) \
00520 && TREE_CODE (__t) != (CODE2) \
00521 && TREE_CODE (__t) != (CODE3) \
00522 && TREE_CODE (__t) != (CODE4)) \
00523 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00524 (CODE1), (CODE2), (CODE3), (CODE4), 0); \
00525 __t; })
00526
00527 #define NON_TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) __extension__ \
00528 ({ const tree __t = (T); \
00529 if (TREE_CODE (__t) == (CODE1) \
00530 || TREE_CODE (__t) == (CODE2) \
00531 || TREE_CODE (__t) == (CODE3) \
00532 || TREE_CODE (__t) == (CODE4)) \
00533 tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00534 (CODE1), (CODE2), (CODE3), (CODE4), 0); \
00535 __t; })
00536
00537 #define TREE_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) __extension__ \
00538 ({ const tree __t = (T); \
00539 if (TREE_CODE (__t) != (CODE1) \
00540 && TREE_CODE (__t) != (CODE2) \
00541 && TREE_CODE (__t) != (CODE3) \
00542 && TREE_CODE (__t) != (CODE4) \
00543 && TREE_CODE (__t) != (CODE5)) \
00544 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00545 (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), 0);\
00546 __t; })
00547
00548 #define TREE_NOT_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) __extension__ \
00549 ({ const tree __t = (T); \
00550 if (TREE_CODE (__t) == (CODE1) \
00551 || TREE_CODE (__t) == (CODE2) \
00552 || TREE_CODE (__t) == (CODE3) \
00553 || TREE_CODE (__t) == (CODE4) \
00554 || TREE_CODE (__t) == (CODE5)) \
00555 tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00556 (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), 0);\
00557 __t; })
00558
00559 #define TREE_CLASS_CHECK(T, CLASS) __extension__ \
00560 ({ const tree __t = (T); \
00561 if (TREE_CODE_CLASS (TREE_CODE(__t)) != (CLASS)) \
00562 tree_class_check_failed (__t, (CLASS), __FILE__, __LINE__, \
00563 __FUNCTION__); \
00564 __t; })
00565
00566
00567 #define EXPR_CHECK(T) __extension__ \
00568 ({ const tree __t = (T); \
00569 char const __c = TREE_CODE_CLASS (TREE_CODE (__t)); \
00570 if (!IS_EXPR_CODE_CLASS (__c)) \
00571 tree_class_check_failed (__t, tcc_expression, __FILE__, __LINE__, \
00572 __FUNCTION__); \
00573 __t; })
00574
00575
00576 #define NON_TYPE_CHECK(T) __extension__ \
00577 ({ const tree __t = (T); \
00578 char const __c = TREE_CODE_CLASS (TREE_CODE (__t)); \
00579 if (!IS_NON_TYPE_CODE_CLASS (__c)) \
00580 tree_class_check_failed (__t, tcc_type, __FILE__, __LINE__, \
00581 __FUNCTION__); \
00582 __t; })
00583
00584 #define TREE_VEC_ELT_CHECK(T, I) __extension__ \
00585 (*({const tree __t = (T); \
00586 const int __i = (I); \
00587 if (TREE_CODE (__t) != TREE_VEC) \
00588 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00589 TREE_VEC, 0); \
00590 if (__i < 0 || __i >= __t->vec.length) \
00591 tree_vec_elt_check_failed (__i, __t->vec.length, \
00592 __FILE__, __LINE__, __FUNCTION__); \
00593 &__t->vec.a[__i]; }))
00594
00595 #define PHI_NODE_ELT_CHECK(t, i) __extension__ \
00596 (*({const tree __t = t; \
00597 const int __i = (i); \
00598 if (TREE_CODE (__t) != PHI_NODE) \
00599 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
00600 PHI_NODE, 0); \
00601 if (__i < 0 || __i >= __t->phi.capacity) \
00602 phi_node_elt_check_failed (__i, __t->phi.num_args, \
00603 __FILE__, __LINE__, __FUNCTION__); \
00604 &__t->phi.a[__i]; }))
00605
00606
00607 #define TREE_OPERAND_CHECK(T, I) __extension__ \
00608 (*({const tree __t = EXPR_CHECK (T); \
00609 const int __i = (I); \
00610 if (__i < 0 || __i >= TREE_CODE_LENGTH (TREE_CODE (__t))) \
00611 tree_operand_check_failed (__i, TREE_CODE (__t), \
00612 __FILE__, __LINE__, __FUNCTION__); \
00613 &__t->exp.operands[__i]; }))
00614
00615 #define TREE_OPERAND_CHECK_CODE(T, CODE, I) __extension__ \
00616 (*({const tree __t = (T); \
00617 const int __i = (I); \
00618 if (TREE_CODE (__t) != CODE) \
00619 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, (CODE), 0);\
00620 if (__i < 0 || __i >= TREE_CODE_LENGTH (CODE)) \
00621 tree_operand_check_failed (__i, (CODE), \
00622 __FILE__, __LINE__, __FUNCTION__); \
00623 &__t->exp.operands[__i]; }))
00624
00625 #define TREE_RTL_OPERAND_CHECK(T, CODE, I) __extension__ \
00626 (*(rtx *) \
00627 ({const tree __t = (T); \
00628 const int __i = (I); \
00629 if (TREE_CODE (__t) != (CODE)) \
00630 tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, (CODE), 0); \
00631 if (__i < 0 || __i >= TREE_CODE_LENGTH ((CODE))) \
00632 tree_operand_check_failed (__i, (CODE), \
00633 __FILE__, __LINE__, __FUNCTION__); \
00634 &__t->exp.operands[__i]; }))
00635
00636 extern void tree_check_failed (const tree, const char *, int, const char *,
00637 ...) ATTRIBUTE_NORETURN;
00638 extern void tree_not_check_failed (const tree, const char *, int, const char *,
00639 ...) ATTRIBUTE_NORETURN;
00640 extern void tree_class_check_failed (const tree, const enum tree_code_class,
00641 const char *, int, const char *)
00642 ATTRIBUTE_NORETURN;
00643 extern void tree_vec_elt_check_failed (int, int, const char *,
00644 int, const char *)
00645 ATTRIBUTE_NORETURN;
00646 extern void phi_node_elt_check_failed (int, int, const char *,
00647 int, const char *)
00648 ATTRIBUTE_NORETURN;
00649 extern void tree_operand_check_failed (int, enum tree_code,
00650 const char *, int, const char *)
00651 ATTRIBUTE_NORETURN;
00652
00653 #else
00654
00655 #define TREE_CHECK(T, CODE) (T)
00656 #define TREE_NOT_CHECK(T, CODE) (T)
00657 #define TREE_CHECK2(T, CODE1, CODE2) (T)
00658 #define TREE_NOT_CHECK2(T, CODE1, CODE2) (T)
00659 #define TREE_CHECK3(T, CODE1, CODE2, CODE3) (T)
00660 #define TREE_NOT_CHECK3(T, CODE1, CODE2, CODE3) (T)
00661 #define TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) (T)
00662 #define TREE_NOT_CHECK4(T, CODE1, CODE2, CODE3, CODE4) (T)
00663 #define TREE_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) (T)
00664 #define TREE_NOT_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) (T)
00665 #define TREE_CLASS_CHECK(T, CODE) (T)
00666 #define EXPR_CHECK(T) (T)
00667 #define NON_TYPE_CHECK(T) (T)
00668 #define TREE_VEC_ELT_CHECK(T, I) ((T)->vec.a[I])
00669 #define TREE_OPERAND_CHECK(T, I) ((T)->exp.operands[I])
00670 #define TREE_OPERAND_CHECK_CODE(T, CODE, I) ((T)->exp.operands[I])
00671 #define TREE_RTL_OPERAND_CHECK(T, CODE, I) (*(rtx *) &((T)->exp.operands[I]))
00672 #define PHI_NODE_ELT_CHECK(T, i) ((T)->phi.a[i])
00673
00674 #endif
00675
00676 #define TREE_BLOCK(NODE) ((NODE)->exp.block)
00677
00678 #include "tree-check.h"
00679
00680 #define TYPE_CHECK(T) TREE_CLASS_CHECK (T, tcc_type)
00681 #define DECL_CHECK(T) TREE_CLASS_CHECK (T, tcc_declaration)
00682 #define CST_CHECK(T) TREE_CLASS_CHECK (T, tcc_constant)
00683 #define STMT_CHECK(T) TREE_CLASS_CHECK (T, tcc_statement)
00684 #define FUNC_OR_METHOD_CHECK(T) TREE_CHECK2 (T, FUNCTION_TYPE, METHOD_TYPE)
00685 #define PTR_OR_REF_CHECK(T) TREE_CHECK2 (T, POINTER_TYPE, REFERENCE_TYPE)
00686
00687 #define RECORD_OR_UNION_CHECK(T) \
00688 TREE_CHECK3 (T, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE)
00689 #define NOT_RECORD_OR_UNION_CHECK(T) \
00690 TREE_NOT_CHECK3 (T, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE)
00691
00692 #define NUMERICAL_TYPE_CHECK(T) \
00693 TREE_CHECK5 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, \
00694 CHAR_TYPE, REAL_TYPE)
00695
00696
00697
00698
00699
00700 #define TREE_TYPE(NODE) ((NODE)->common.type)
00701
00702
00703
00704 #define TYPE_HASH(TYPE) (TYPE_UID (TYPE))
00705
00706
00707
00708 #define TREE_HASH(NODE) ((size_t) (NODE) & 0777777)
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719 #define TREE_CHAIN(NODE) ((NODE)->common.chain)
00720
00721
00722
00723
00724 #define STRIP_NOPS(EXP) \
00725 while ((TREE_CODE (EXP) == NOP_EXPR \
00726 || TREE_CODE (EXP) == CONVERT_EXPR \
00727 || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
00728 && TREE_OPERAND (EXP, 0) != error_mark_node \
00729 && (TYPE_MODE (TREE_TYPE (EXP)) \
00730 == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
00731 (EXP) = TREE_OPERAND (EXP, 0)
00732
00733
00734
00735 #define STRIP_SIGN_NOPS(EXP) \
00736 while ((TREE_CODE (EXP) == NOP_EXPR \
00737 || TREE_CODE (EXP) == CONVERT_EXPR \
00738 || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
00739 && TREE_OPERAND (EXP, 0) != error_mark_node \
00740 && (TYPE_MODE (TREE_TYPE (EXP)) \
00741 == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0)))) \
00742 && (TYPE_UNSIGNED (TREE_TYPE (EXP)) \
00743 == TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
00744 (EXP) = TREE_OPERAND (EXP, 0)
00745
00746
00747
00748 #define STRIP_MAIN_TYPE_NOPS(EXP) \
00749 while ((TREE_CODE (EXP) == NOP_EXPR \
00750 || TREE_CODE (EXP) == CONVERT_EXPR \
00751 || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
00752 && TREE_OPERAND (EXP, 0) != error_mark_node \
00753 && (TYPE_MAIN_VARIANT (TREE_TYPE (EXP)) \
00754 == TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
00755 (EXP) = TREE_OPERAND (EXP, 0)
00756
00757
00758
00759 #define STRIP_TYPE_NOPS(EXP) \
00760 while ((TREE_CODE (EXP) == NOP_EXPR \
00761 || TREE_CODE (EXP) == CONVERT_EXPR \
00762 || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
00763 && TREE_OPERAND (EXP, 0) != error_mark_node \
00764 && (TREE_TYPE (EXP) \
00765 == TREE_TYPE (TREE_OPERAND (EXP, 0)))) \
00766 (EXP) = TREE_OPERAND (EXP, 0)
00767
00768
00769
00770
00771 #define STRIP_USELESS_TYPE_CONVERSION(EXP) \
00772 while (tree_ssa_useless_type_conversion (EXP)) \
00773 EXP = TREE_OPERAND (EXP, 0)
00774
00775
00776
00777
00778
00779 #define INTEGRAL_TYPE_P(TYPE) \
00780 (TREE_CODE (TYPE) == ENUMERAL_TYPE \
00781 || TREE_CODE (TYPE) == BOOLEAN_TYPE \
00782 || TREE_CODE (TYPE) == CHAR_TYPE \
00783 || TREE_CODE (TYPE) == INTEGER_TYPE)
00784
00785
00786
00787 #define SCALAR_FLOAT_TYPE_P(TYPE) (TREE_CODE (TYPE) == REAL_TYPE)
00788
00789
00790
00791 #define COMPLEX_FLOAT_TYPE_P(TYPE) \
00792 (TREE_CODE (TYPE) == COMPLEX_TYPE \
00793 && TREE_CODE (TREE_TYPE (TYPE)) == REAL_TYPE)
00794
00795
00796
00797 #define VECTOR_FLOAT_TYPE_P(TYPE) \
00798 (TREE_CODE (TYPE) == VECTOR_TYPE \
00799 && TREE_CODE (TREE_TYPE (TYPE)) == REAL_TYPE)
00800
00801
00802
00803
00804
00805 #define FLOAT_TYPE_P(TYPE) \
00806 (SCALAR_FLOAT_TYPE_P (TYPE) \
00807 || ((TREE_CODE (TYPE) == COMPLEX_TYPE \
00808 || TREE_CODE (TYPE) == VECTOR_TYPE) \
00809 && SCALAR_FLOAT_TYPE_P (TREE_TYPE (TYPE))))
00810
00811
00812
00813
00814 #define AGGREGATE_TYPE_P(TYPE) \
00815 (TREE_CODE (TYPE) == ARRAY_TYPE || TREE_CODE (TYPE) == RECORD_TYPE \
00816 || TREE_CODE (TYPE) == UNION_TYPE || TREE_CODE (TYPE) == QUAL_UNION_TYPE)
00817
00818
00819
00820
00821
00822 #define POINTER_TYPE_P(TYPE) \
00823 (TREE_CODE (TYPE) == POINTER_TYPE || TREE_CODE (TYPE) == REFERENCE_TYPE)
00824
00825
00826 #define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE)
00827
00828
00829 #define VOID_TYPE_P(NODE) (TREE_CODE (NODE) == VOID_TYPE)
00830
00831
00832 #define COMPLETE_OR_VOID_TYPE_P(NODE) \
00833 (COMPLETE_TYPE_P (NODE) || VOID_TYPE_P (NODE))
00834
00835
00836 #define COMPLETE_OR_UNBOUND_ARRAY_TYPE_P(NODE) \
00837 (COMPLETE_TYPE_P (TREE_CODE (NODE) == ARRAY_TYPE ? TREE_TYPE (NODE) : (NODE)))
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857 #define TREE_ADDRESSABLE(NODE) ((NODE)->common.addressable_flag)
00858
00859
00860
00861
00862 #define CALL_EXPR_TAILCALL(NODE) (CALL_EXPR_CHECK(NODE)->common.addressable_flag)
00863
00864
00865
00866
00867
00868
00869
00870 #define TREE_STATIC(NODE) ((NODE)->common.static_flag)
00871
00872
00873
00874
00875 #define CLEANUP_EH_ONLY(NODE) ((NODE)->common.static_flag)
00876
00877
00878
00879
00880
00881
00882 #define TREE_NO_WARNING(NODE) ((NODE)->common.nowarning_flag)
00883
00884
00885
00886
00887
00888 #define TREE_CONSTANT_OVERFLOW(NODE) (CST_CHECK (NODE)->common.static_flag)
00889
00890
00891
00892 #define TREE_SYMBOL_REFERENCED(NODE) \
00893 (IDENTIFIER_NODE_CHECK (NODE)->common.static_flag)
00894
00895
00896
00897 #define TYPE_REF_CAN_ALIAS_ALL(NODE) \
00898 (PTR_OR_REF_CHECK (NODE)->common.static_flag)
00899
00900
00901
00902
00903
00904
00905
00906
00907 #define TREE_OVERFLOW(NODE) ((NODE)->common.public_flag)
00908
00909
00910
00911
00912
00913
00914 #define TREE_PUBLIC(NODE) ((NODE)->common.public_flag)
00915
00916
00917
00918 #define TYPE_CACHED_VALUES_P(NODE) (TYPE_CHECK(NODE)->common.public_flag)
00919
00920
00921
00922 #define SAVE_EXPR_RESOLVED_P(NODE) \
00923 (TREE_CHECK (NODE, SAVE_EXPR)->common.public_flag)
00924
00925
00926
00927
00928
00929
00930 #define TREE_SIDE_EFFECTS(NODE) \
00931 (NON_TYPE_CHECK (NODE)->common.side_effects_flag)
00932
00933
00934
00935
00936 #define FORCED_LABEL(NODE) ((NODE)->common.side_effects_flag)
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948 #define TREE_THIS_VOLATILE(NODE) ((NODE)->common.volatile_flag)
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959
00960 #define TREE_THIS_NOTRAP(NODE) ((NODE)->common.nothrow_flag)
00961
00962
00963
00964 #define TREE_READONLY(NODE) (NON_TYPE_CHECK (NODE)->common.readonly_flag)
00965
00966
00967 #define TREE_READONLY_DECL_P(NODE)\
00968 (DECL_P (NODE) && TREE_READONLY (NODE))
00969
00970
00971
00972 #define TREE_CONSTANT(NODE) (NON_TYPE_CHECK (NODE)->common.constant_flag)
00973
00974
00975 #define TYPE_SIZES_GIMPLIFIED(NODE) (TYPE_CHECK (NODE)->common.constant_flag)
00976
00977
00978 #define DECL_UNSIGNED(NODE) (DECL_CHECK (NODE)->common.unsigned_flag)
00979
00980
00981 #define BIT_FIELD_REF_UNSIGNED(NODE) \
00982 (BIT_FIELD_REF_CHECK (NODE)->common.unsigned_flag)
00983
00984
00985 #define TYPE_UNSIGNED(NODE) (TYPE_CHECK (NODE)->common.unsigned_flag)
00986
00987 #define TYPE_TRAP_SIGNED(NODE) \
00988 (flag_trapv && ! TYPE_UNSIGNED (NODE))
00989
00990
00991
00992
00993
00994
00995
00996
00997
00998
00999 #define TREE_ASM_WRITTEN(NODE) ((NODE)->common.asm_written_flag)
01000
01001
01002
01003
01004
01005
01006 #define TREE_USED(NODE) ((NODE)->common.used_flag)
01007
01008
01009
01010 #define TREE_NOTHROW(NODE) ((NODE)->common.nothrow_flag)
01011
01012
01013
01014 #define CALL_EXPR_HAS_RETURN_SLOT_ADDR(NODE) ((NODE)->common.private_flag)
01015
01016
01017
01018 #define DECL_BY_REFERENCE(NODE) (DECL_CHECK (NODE)->common.private_flag)
01019
01020
01021
01022 #define CALL_FROM_THUNK_P(NODE) ((NODE)->common.protected_flag)
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032
01033 #define TYPE_ALIGN_OK(NODE) (TYPE_CHECK (NODE)->common.nothrow_flag)
01034
01035
01036 #define TREE_PRIVATE(NODE) ((NODE)->common.private_flag)
01037
01038
01039 #define TREE_PROTECTED(NODE) ((NODE)->common.protected_flag)
01040
01041
01042
01043 #define TREE_DEPRECATED(NODE) ((NODE)->common.deprecated_flag)
01044
01045
01046
01047
01048
01049 #define TREE_INVARIANT(NODE) ((NODE)->common.invariant_flag)
01050
01051
01052 #define TREE_LANG_FLAG_0(NODE) ((NODE)->common.lang_flag_0)
01053 #define TREE_LANG_FLAG_1(NODE) ((NODE)->common.lang_flag_1)
01054 #define TREE_LANG_FLAG_2(NODE) ((NODE)->common.lang_flag_2)
01055 #define TREE_LANG_FLAG_3(NODE) ((NODE)->common.lang_flag_3)
01056 #define TREE_LANG_FLAG_4(NODE) ((NODE)->common.lang_flag_4)
01057 #define TREE_LANG_FLAG_5(NODE) ((NODE)->common.lang_flag_5)
01058 #define TREE_LANG_FLAG_6(NODE) ((NODE)->common.lang_flag_6)
01059
01060
01061
01062
01063
01064
01065
01066 #define TREE_INT_CST(NODE) (INTEGER_CST_CHECK (NODE)->int_cst.int_cst)
01067 #define TREE_INT_CST_LOW(NODE) (TREE_INT_CST (NODE).low)
01068 #define TREE_INT_CST_HIGH(NODE) (TREE_INT_CST (NODE).high)
01069
01070 #define INT_CST_LT(A, B) \
01071 (TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \
01072 || (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B) \
01073 && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B)))
01074
01075 #define INT_CST_LT_UNSIGNED(A, B) \
01076 (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
01077 < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
01078 || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
01079 == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
01080 && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B)))
01081
01082 struct tree_int_cst GTY(())
01083 {
01084 struct tree_common common;
01085
01086
01087
01088 struct tree_int_cst_lowhi {
01089 unsigned HOST_WIDE_INT low;
01090 HOST_WIDE_INT high;
01091 } int_cst;
01092 };
01093
01094
01095
01096
01097 struct real_value;
01098
01099 #define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr)
01100 #define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE))
01101
01102 struct tree_real_cst GTY(())
01103 {
01104 struct tree_common common;
01105 struct real_value * real_cst_ptr;
01106 };
01107
01108
01109 #define TREE_STRING_LENGTH(NODE) (STRING_CST_CHECK (NODE)->string.length)
01110 #define TREE_STRING_POINTER(NODE) \
01111 ((const char *)(STRING_CST_CHECK (NODE)->string.str))
01112
01113 struct tree_string GTY(())
01114 {
01115 struct tree_common common;
01116 int length;
01117 char str[1];
01118 };
01119
01120
01121 #define TREE_REALPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.real)
01122 #define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag)
01123
01124 struct tree_complex GTY(())
01125 {
01126 struct tree_common common;
01127 tree real;
01128 tree imag;
01129 };
01130
01131
01132 #define TREE_VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elements)
01133
01134 struct tree_vector GTY(())
01135 {
01136 struct tree_common common;
01137 tree elements;
01138 };
01139
01140 #include "symtab.h"
01141
01142
01143
01144 #define IDENTIFIER_LENGTH(NODE) \
01145 (IDENTIFIER_NODE_CHECK (NODE)->identifier.id.len)
01146 #define IDENTIFIER_POINTER(NODE) \
01147 ((const char *) IDENTIFIER_NODE_CHECK (NODE)->identifier.id.str)
01148 #define IDENTIFIER_HASH_VALUE(NODE) \
01149 (IDENTIFIER_NODE_CHECK (NODE)->identifier.id.hash_value)
01150
01151
01152
01153
01154 #define HT_IDENT_TO_GCC_IDENT(NODE) \
01155 ((tree) ((char *) (NODE) - sizeof (struct tree_common)))
01156 #define GCC_IDENT_TO_HT_IDENT(NODE) (&((struct tree_identifier *) (NODE))->id)
01157
01158 struct tree_identifier GTY(())
01159 {
01160 struct tree_common common;
01161 struct ht_identifier id;
01162 };
01163
01164
01165 #define TREE_PURPOSE(NODE) (TREE_LIST_CHECK (NODE)->list.purpose)
01166 #define TREE_VALUE(NODE) (TREE_LIST_CHECK (NODE)->list.value)
01167
01168 struct tree_list GTY(())
01169 {
01170 struct tree_common common;
01171 tree purpose;
01172 tree value;
01173 };
01174
01175
01176 #define TREE_VEC_LENGTH(NODE) (TREE_VEC_CHECK (NODE)->vec.length)
01177 #define TREE_VEC_END(NODE) \
01178 ((void) TREE_VEC_CHECK (NODE), &((NODE)->vec.a[(NODE)->vec.length]))
01179
01180 #define TREE_VEC_ELT(NODE,I) TREE_VEC_ELT_CHECK (NODE, I)
01181
01182 struct tree_vec GTY(())
01183 {
01184 struct tree_common common;
01185 int length;
01186 tree GTY ((length ("TREE_VEC_LENGTH ((tree)&%h)"))) a[1];
01187 };
01188
01189
01190
01191
01192 #define IS_EMPTY_STMT(NODE) (TREE_CODE (NODE) == NOP_EXPR \
01193 && VOID_TYPE_P (TREE_TYPE (NODE)) \
01194 && integer_zerop (TREE_OPERAND (NODE, 0)))
01195
01196
01197 #define CONSTRUCTOR_ELTS(NODE) TREE_OPERAND_CHECK_CODE (NODE, CONSTRUCTOR, 0)
01198
01199
01200 #define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I)
01201 #define TREE_COMPLEXITY(NODE) (EXPR_CHECK (NODE)->exp.complexity)
01202
01203
01204 #define REF_ORIGINAL(NODE) TREE_CHAIN (TREE_CHECK3 (NODE, \
01205 INDIRECT_REF, ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF))
01206
01207
01208 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0)
01209
01210 #ifdef USE_MAPPED_LOCATION
01211
01212
01213
01214 #define EXPR_LOCATION(NODE) \
01215 (EXPR_P (NODE) ? (NODE)->exp.locus : UNKNOWN_LOCATION)
01216 #define SET_EXPR_LOCATION(NODE, FROM) \
01217 (EXPR_CHECK (NODE)->exp.locus = (FROM))
01218 #define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION)
01219
01220 #define EXPR_LOCUS(NODE) \
01221 (EXPR_P (NODE) ? &(NODE)->exp.locus : (location_t *)NULL)
01222 #define SET_EXPR_LOCUS(NODE, FROM) \
01223 do { source_location *loc_tmp = FROM; \
01224 EXPR_CHECK (NODE)->exp.locus \
01225 = loc_tmp == NULL ? UNKNOWN_LOCATION : *loc_tmp; } while (0)
01226 #define EXPR_FILENAME(NODE) \
01227 LOCATION_FILE (EXPR_CHECK (NODE)->exp.locus)
01228 #define EXPR_LINENO(NODE) \
01229 LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus)
01230 #else
01231
01232
01233
01234 #define EXPR_LOCUS(NODE) \
01235 (EXPR_P (NODE) ? (NODE)->exp.locus : (location_t *)NULL)
01236 #define SET_EXPR_LOCUS(NODE, FROM) \
01237 (EXPR_CHECK (NODE)->exp.locus = (FROM))
01238 #define SET_EXPR_LOCATION(NODE, FROM) annotate_with_locus (NODE, FROM)
01239 #define EXPR_FILENAME(NODE) \
01240 (EXPR_CHECK (NODE)->exp.locus->file)
01241 #define EXPR_LINENO(NODE) \
01242 (EXPR_CHECK (NODE)->exp.locus->line)
01243 #define EXPR_HAS_LOCATION(NODE) (EXPR_LOCUS (NODE) != NULL)
01244 #define EXPR_LOCATION(NODE) \
01245 (EXPR_HAS_LOCATION(NODE) ? *(NODE)->exp.locus : UNKNOWN_LOCATION)
01246 #endif
01247
01248
01249 #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0)
01250 #define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 1)
01251 #define TARGET_EXPR_CLEANUP(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 2)
01252
01253
01254
01255 #define DECL_EXPR_DECL(NODE) TREE_OPERAND (DECL_EXPR_CHECK (NODE), 0)
01256
01257 #define EXIT_EXPR_COND(NODE) TREE_OPERAND (EXIT_EXPR_CHECK (NODE), 0)
01258
01259
01260
01261
01262 #define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 0)
01263 #define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 1)
01264 #define SWITCH_LABELS(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 2)
01265
01266
01267
01268 #define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 0)
01269 #define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 1)
01270 #define CASE_LABEL(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 2)
01271
01272
01273 #define BIND_EXPR_VARS(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 0))
01274 #define BIND_EXPR_BODY(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 1))
01275 #define BIND_EXPR_BLOCK(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 2))
01276
01277
01278
01279 #define GOTO_DESTINATION(NODE) TREE_OPERAND ((NODE), 0)
01280
01281
01282
01283
01284
01285 #define ASM_STRING(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 0)
01286 #define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 1)
01287 #define ASM_INPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 2)
01288 #define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 3)
01289
01290
01291 #define ASM_INPUT_P(NODE) (TREE_STATIC (NODE))
01292 #define ASM_VOLATILE_P(NODE) (TREE_PUBLIC (NODE))
01293
01294
01295 #define COND_EXPR_COND(NODE) (TREE_OPERAND (COND_EXPR_CHECK (NODE), 0))
01296 #define COND_EXPR_THEN(NODE) (TREE_OPERAND (COND_EXPR_CHECK (NODE), 1))
01297 #define COND_EXPR_ELSE(NODE) (TREE_OPERAND (COND_EXPR_CHECK (NODE), 2))
01298
01299
01300
01301 #define LABEL_EXPR_LABEL(NODE) TREE_OPERAND (LABEL_EXPR_CHECK (NODE), 0)
01302
01303
01304
01305
01306
01307 #define CATCH_TYPES(NODE) TREE_OPERAND (CATCH_EXPR_CHECK (NODE), 0)
01308 #define CATCH_BODY(NODE) TREE_OPERAND (CATCH_EXPR_CHECK (NODE), 1)
01309
01310
01311 #define EH_FILTER_TYPES(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 0)
01312 #define EH_FILTER_FAILURE(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 1)
01313 #define EH_FILTER_MUST_NOT_THROW(NODE) TREE_STATIC (EH_FILTER_EXPR_CHECK (NODE))
01314
01315
01316 #define OBJ_TYPE_REF_EXPR(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 0)
01317 #define OBJ_TYPE_REF_OBJECT(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 1)
01318 #define OBJ_TYPE_REF_TOKEN(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 2)
01319
01320 struct tree_exp GTY(())
01321 {
01322 struct tree_common common;
01323 source_locus locus;
01324 int complexity;
01325 tree block;
01326 tree GTY ((special ("tree_exp"),
01327 desc ("TREE_CODE ((tree) &%0)")))
01328 operands[1];
01329 };
01330
01331
01332
01333
01334
01335 #define SSA_NAME_VAR(NODE) SSA_NAME_CHECK (NODE)->ssa_name.var
01336
01337
01338
01339
01340 #define SSA_NAME_DEF_STMT(NODE) SSA_NAME_CHECK (NODE)->common.chain
01341
01342
01343
01344 #define SSA_NAME_VERSION(NODE) SSA_NAME_CHECK (NODE)->ssa_name.version
01345
01346
01347
01348
01349 #define SSA_NAME_OCCURS_IN_ABNORMAL_PHI(NODE) \
01350 SSA_NAME_CHECK (NODE)->common.asm_written_flag
01351
01352
01353
01354
01355 #define SSA_NAME_IN_FREE_LIST(NODE) \
01356 SSA_NAME_CHECK (NODE)->common.nothrow_flag
01357
01358
01359 #define SSA_NAME_PTR_INFO(N) \
01360 SSA_NAME_CHECK (N)->ssa_name.ptr_info
01361
01362
01363 #define SSA_NAME_VALUE(N) \
01364 SSA_NAME_CHECK (N)->ssa_name.value_handle
01365
01366
01367 #define SSA_NAME_AUX(N) \
01368 SSA_NAME_CHECK (N)->ssa_name.aux
01369
01370 #ifndef _TREE_FLOW_H
01371 struct ptr_info_def;
01372 #endif
01373
01374 struct tree_ssa_name GTY(())
01375 {
01376 struct tree_common common;
01377
01378
01379 tree var;
01380
01381
01382 unsigned int version;
01383
01384
01385 struct ptr_info_def *ptr_info;
01386
01387
01388
01389
01390
01391
01392 tree value_handle;
01393
01394
01395 PTR GTY((skip)) aux;
01396 };
01397
01398
01399 #define PHI_RESULT_TREE(NODE) PHI_NODE_CHECK (NODE)->phi.result
01400 #define PHI_ARG_DEF_TREE(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).def
01401
01402
01403
01404
01405 #define PHI_CHAIN(NODE) TREE_CHAIN (PHI_NODE_CHECK (NODE))
01406
01407
01408
01409 #define PHI_REWRITTEN(NODE) PHI_NODE_CHECK (NODE)->phi.rewritten
01410 #define PHI_NUM_ARGS(NODE) PHI_NODE_CHECK (NODE)->phi.num_args
01411 #define PHI_ARG_CAPACITY(NODE) PHI_NODE_CHECK (NODE)->phi.capacity
01412 #define PHI_ARG_ELT(NODE, I) PHI_NODE_ELT_CHECK (NODE, I)
01413 #define PHI_ARG_EDGE(NODE, I) (EDGE_PRED (PHI_BB ((NODE)), (I)))
01414 #define PHI_ARG_NONZERO(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).nonzero
01415 #define PHI_BB(NODE) PHI_NODE_CHECK (NODE)->phi.bb
01416 #define PHI_DF(NODE) PHI_NODE_CHECK (NODE)->phi.df
01417
01418 struct edge_def;
01419
01420 struct phi_arg_d GTY(())
01421 {
01422 tree def;
01423 bool nonzero;
01424 };
01425
01426 struct tree_phi_node GTY(())
01427 {
01428 struct tree_common common;
01429 tree result;
01430 int num_args;
01431 int capacity;
01432
01433
01434
01435 int rewritten;
01436
01437
01438 struct basic_block_def *bb;
01439
01440
01441 struct dataflow_d *df;
01442
01443 struct phi_arg_d GTY ((length ("((tree)&%h)->phi.num_args"))) a[1];
01444 };
01445
01446
01447 struct varray_head_tag;
01448
01449 /* In a BLOCK node. */
01450 #define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars)
01451 #define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks)
01452 #define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext)
01453 /* Note: when changing this, make sure to find the places
01454 that use chainon or nreverse. */
01455 #define BLOCK_CHAIN(NODE) TREE_CHAIN (BLOCK_CHECK (NODE))
01456 #define BLOCK_ABSTRACT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.abstract_origin)
01457 #define BLOCK_ABSTRACT(NODE) (BLOCK_CHECK (NODE)->block.abstract_flag)
01458
01459 /* Nonzero means that this block is prepared to handle exceptions
01460 listed in the BLOCK_VARS slot. */
01461 #define BLOCK_HANDLER_BLOCK(NODE) \
01462 (BLOCK_CHECK (NODE)->block.handler_block_flag)
01463
01464 /* An index number for this block. These values are not guaranteed to
01465 be unique across functions -- whether or not they are depends on
01466 the debugging output format in use. */
01467 #define BLOCK_NUMBER(NODE) (BLOCK_CHECK (NODE)->block.block_num)
01468
01469 /* If block reordering splits a lexical block into discontiguous
01470 address ranges, we'll make a copy of the original block.
01471
01472 Note that this is logically distinct from BLOCK_ABSTRACT_ORIGIN.
01473 In that case, we have one source block that has been replicated
01474 (through inlining or unrolling) into many logical blocks, and that
01475 these logical blocks have different physical variables in them.
01476
01477 In this case, we have one logical block split into several
01478 non-contiguous address ranges. Most debug formats can't actually
01479 represent this idea directly, so we fake it by creating multiple
01480 logical blocks with the same variables in them. However, for those
01481 that do support non-contiguous regions, these allow the original
01482 logical block to be reconstructed, along with the set of address
01483 ranges.
01484
01485 One of the logical block fragments is arbitrarily chosen to be
01486 the ORIGIN. The other fragments will point to the origin via
01487 BLOCK_FRAGMENT_ORIGIN; the origin itself will have this pointer
01488 be null. The list of fragments will be chained through
01489 BLOCK_FRAGMENT_CHAIN from the origin. */
01490
01491 #define BLOCK_FRAGMENT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.fragment_origin)
01492 #define BLOCK_FRAGMENT_CHAIN(NODE) (BLOCK_CHECK (NODE)->block.fragment_chain)
01493
01494 struct tree_block GTY(())
01495 {
01496 struct tree_common common;
01497
01498 unsigned handler_block_flag : 1;
01499 unsigned abstract_flag : 1;
01500 unsigned block_num : 30;
01501
01502 tree vars;
01503 tree subblocks;
01504 tree supercontext;
01505 tree abstract_origin;
01506 tree fragment_origin;
01507 tree fragment_chain;
01508 };
01509
01510 /* Define fields and accessors for nodes representing data types. */
01511
01512 /* See tree.def for documentation of the use of these fields.
01513 Look at the documentation of the various ..._TYPE tree codes.
01514
01515 Note that the type.values, type.minval, and type.maxval fields are
01516 overloaded and used for different macros in different kinds of types.
01517 Each macro must check to ensure the tree node is of the proper kind of
01518 type. Note also that some of the front-ends also overload these fields,
01519 so they must be checked as well. */
01520
01521 #define TYPE_UID(NODE) (TYPE_CHECK (NODE)->type.uid)
01522 #define TYPE_SIZE(NODE) (TYPE_CHECK (NODE)->type.size)
01523 #define TYPE_SIZE_UNIT(NODE) (TYPE_CHECK (NODE)->type.size_unit)
01524 #define TYPE_MODE(NODE) (TYPE_CHECK (NODE)->type.mode)
01525 #define TYPE_VALUES(NODE) (ENUMERAL_TYPE_CHECK (NODE)->type.values)
01526 #define TYPE_DOMAIN(NODE) (ARRAY_TYPE_CHECK (NODE)->type.values)
01527 #define TYPE_FIELDS(NODE) (RECORD_OR_UNION_CHECK (NODE)->type.values)
01528 #define TYPE_CACHED_VALUES(NODE) (TYPE_CHECK(NODE)->type.values)
01529 #define TYPE_ORIG_SIZE_TYPE(NODE) \
01530 (INTEGER_TYPE_CHECK (NODE)->type.values \
01531 ? TREE_TYPE ((NODE)->type.values) : NULL_TREE)
01532 #define TYPE_METHODS(NODE) (RECORD_OR_UNION_CHECK (NODE)->type.maxval)
01533 #define TYPE_VFIELD(NODE) (RECORD_OR_UNION_CHECK (NODE)->type.minval)
01534 #define TYPE_ARG_TYPES(NODE) (FUNC_OR_METHOD_CHECK (NODE)->type.values)
01535 #define TYPE_METHOD_BASETYPE(NODE) (FUNC_OR_METHOD_CHECK (NODE)->type.maxval)
01536 #define TYPE_OFFSET_BASETYPE(NODE) (OFFSET_TYPE_CHECK (NODE)->type.maxval)
01537 #define TYPE_POINTER_TO(NODE) (TYPE_CHECK (NODE)->type.pointer_to)
01538 #define TYPE_REFERENCE_TO(NODE) (TYPE_CHECK (NODE)->type.reference_to)
01539 #define TYPE_NEXT_PTR_TO(NODE) (POINTER_TYPE_CHECK (NODE)->type.minval)
01540 #define TYPE_NEXT_REF_TO(NODE) (REFERENCE_TYPE_CHECK (NODE)->type.minval)
01541 #define TYPE_MIN_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.minval)
01542 #define TYPE_MAX_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.maxval)
01543 #define TYPE_PRECISION(NODE) (TYPE_CHECK (NODE)->type.precision)
01544 #define TYPE_SYMTAB_ADDRESS(NODE) (TYPE_CHECK (NODE)->type.symtab.address)
01545 #define TYPE_SYMTAB_POINTER(NODE) (TYPE_CHECK (NODE)->type.symtab.pointer)
01546 #define TYPE_SYMTAB_DIE(NODE) (TYPE_CHECK (NODE)->type.symtab.die)
01547 #define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->type.name)
01548 #define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type.next_variant)
01549 #define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type.main_variant)
01550 #define TYPE_CONTEXT(NODE) (TYPE_CHECK (NODE)->type.context)
01551 #define TYPE_LANG_SPECIFIC(NODE) (TYPE_CHECK (NODE)->type.lang_specific)
01552
01553 /* For a VECTOR_TYPE node, this describes a different type which is emitted
01554 in the debugging output. We use this to describe a vector as a
01555 structure containing an array. */
01556 #define TYPE_DEBUG_REPRESENTATION_TYPE(NODE) (VECTOR_TYPE_CHECK (NODE)->type.values)
01557
01558 /* For record and union types, information about this type, as a base type
01559 for itself. */
01560 #define TYPE_BINFO(NODE) (RECORD_OR_UNION_CHECK(NODE)->type.binfo)
01561
01562 /* For non record and union types, used in a language-dependent way. */
01563 #define TYPE_LANG_SLOT_1(NODE) (NOT_RECORD_OR_UNION_CHECK(NODE)->type.binfo)
01564
01565 /* The (language-specific) typed-based alias set for this type.
01566 Objects whose TYPE_ALIAS_SETs are different cannot alias each
01567 other. If the TYPE_ALIAS_SET is -1, no alias set has yet been
01568 assigned to this type. If the TYPE_ALIAS_SET is 0, objects of this
01569 type can alias objects of any type. */
01570 #define TYPE_ALIAS_SET(NODE) (TYPE_CHECK (NODE)->type.alias_set)
01571
01572 /* Nonzero iff the typed-based alias set for this type has been
01573 calculated. */
01574 #define TYPE_ALIAS_SET_KNOWN_P(NODE) (TYPE_CHECK (NODE)->type.alias_set != -1)
01575
01576 /* A TREE_LIST of IDENTIFIER nodes of the attributes that apply
01577 to this type. */
01578 #define TYPE_ATTRIBUTES(NODE) (TYPE_CHECK (NODE)->type.attributes)
01579
01580 /* The alignment necessary for objects of this type.
01581 The value is an int, measured in bits. */
01582 #define TYPE_ALIGN(NODE) (TYPE_CHECK (NODE)->type.align)
01583
01584 /* 1 if the alignment for this type was requested by "aligned" attribute,
01585 0 if it is the default for this type. */
01586 #define TYPE_USER_ALIGN(NODE) (TYPE_CHECK (NODE)->type.user_align)
01587
01588 /* The alignment for NODE, in bytes. */
01589 #define TYPE_ALIGN_UNIT(NODE) (TYPE_ALIGN (NODE) / BITS_PER_UNIT)
01590
01591 /* If your language allows you to declare types, and you want debug info
01592 for them, then you need to generate corresponding TYPE_DECL nodes.
01593 These "stub" TYPE_DECL nodes have no name, and simply point at the
01594 type node. You then set the TYPE_STUB_DECL field of the type node
01595 to point back at the TYPE_DECL node. This allows the debug routines
01596 to know that the two nodes represent the same type, so that we only
01597 get one debug info record for them. */
01598 #define TYPE_STUB_DECL(NODE) TREE_CHAIN (NODE)
01599
01600 /* In a RECORD_TYPE, UNION_TYPE or QUAL_UNION_TYPE, it means the type
01601 has BLKmode only because it lacks the alignment requirement for
01602 its size. */
01603 #define TYPE_NO_FORCE_BLK(NODE) (TYPE_CHECK (NODE)->type.no_force_blk_flag)
01604
01605 /* In an INTEGER_TYPE, it means the type represents a size. We use
01606 this both for validity checking and to permit optimizations that
01607 are unsafe for other types. Note that the C `size_t' type should
01608 *not* have this flag set. The `size_t' type is simply a typedef
01609 for an ordinary integer type that happens to be the type of an
01610 expression returned by `sizeof'; `size_t' has no special
01611 properties. Expressions whose type have TYPE_IS_SIZETYPE set are
01612 always actual sizes. */
01613 #define TYPE_IS_SIZETYPE(NODE) \
01614 (INTEGER_TYPE_CHECK (NODE)->type.no_force_blk_flag)
01615
01616 /* In a FUNCTION_TYPE, indicates that the function returns with the stack
01617 pointer depressed. */
01618 #define TYPE_RETURNS_STACK_DEPRESSED(NODE) \
01619 (FUNCTION_TYPE_CHECK (NODE)->type.no_force_blk_flag)
01620
01621 /* Nonzero in a type considered volatile as a whole. */
01622 #define TYPE_VOLATILE(NODE) (TYPE_CHECK (NODE)->common.volatile_flag)
01623
01624 /* Means this type is const-qualified. */
01625 #define TYPE_READONLY(NODE) (TYPE_CHECK (NODE)->common.readonly_flag)
01626
01627 /* If nonzero, this type is `restrict'-qualified, in the C sense of
01628 the term. */
01629 #define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->type.restrict_flag)
01630
01631 /* There is a TYPE_QUAL value for each type qualifier. They can be
01632 combined by bitwise-or to form the complete set of qualifiers for a
01633 type. */
01634
01635 #define TYPE_UNQUALIFIED 0x0
01636 #define TYPE_QUAL_CONST 0x1
01637 #define TYPE_QUAL_VOLATILE 0x2
01638 #define TYPE_QUAL_RESTRICT 0x4
01639
01640 /* The set of type qualifiers for this type. */
01641 #define TYPE_QUALS(NODE) \
01642 ((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \
01643 | (TYPE_VOLATILE (NODE) * TYPE_QUAL_VOLATILE) \
01644 | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT))
01645
01646 /* These flags are available for each language front end to use internally. */
01647 #define TYPE_LANG_FLAG_0(NODE) (TYPE_CHECK (NODE)->type.lang_flag_0)
01648 #define TYPE_LANG_FLAG_1(NODE) (TYPE_CHECK (NODE)->type.lang_flag_1)
01649 #define TYPE_LANG_FLAG_2(NODE) (TYPE_CHECK (NODE)->type.lang_flag_2)
01650 #define TYPE_LANG_FLAG_3(NODE) (TYPE_CHECK (NODE)->type.lang_flag_3)
01651 #define TYPE_LANG_FLAG_4(NODE) (TYPE_CHECK (NODE)->type.lang_flag_4)
01652 #define TYPE_LANG_FLAG_5(NODE) (TYPE_CHECK (NODE)->type.lang_flag_5)
01653 #define TYPE_LANG_FLAG_6(NODE) (TYPE_CHECK (NODE)->type.lang_flag_6)
01654
01655 /* Used to keep track of visited nodes in tree traversals. This is set to
01656 0 by copy_node and make_node. */
01657 #define TREE_VISITED(NODE) ((NODE)->common.visited)
01658
01659 #ifdef KEY
01660 #define TREE_EMITTED(NODE) ((NODE)->common.emitted)
01661 #define TREE_NOT_EMITTED_BY_GXX(NODE) ((NODE)->common.not_emitted_by_gxx)
01662 #define GS_NODE(NODE) ((gs_void_t *)TREE_TO_TRANSLATED_GS(NODE))
01663 #define TREE_TO_TRANSLATED_GS(NODE) ((NODE)->common.translated_gs_node)
01664 #define DWARF_ACCESS(NODE) ((NODE)->common.dwarf_access)
01665
01666 /* Inside a TARGET_EXPR, keep track if GNU is emitting the cleanup */
01667 #define EMIT_TARGET_EXPR_CLEANUP(NODE) ((NODE)->common.emit_target_expr_cleanup)
01668 #define FULLY_TRANSLATED_TO_GS(NODE) ((NODE)->common.fully_translated_to_gs)
01669 #define GS_SEQUENCE_NUM(NODE) ((NODE)->common.gs_sequence_num)
01670 #endif
01671
01672 /* If set in an ARRAY_TYPE, indicates a string type (for languages
01673 that distinguish string from array of char).
01674 If set in a SET_TYPE, indicates a bitstring type. */
01675 #define TYPE_STRING_FLAG(NODE) (TYPE_CHECK (NODE)->type.string_flag)
01676
01677 /* If non-NULL, this is an upper bound of the size (in bytes) of an
01678 object of the given ARRAY_TYPE. This allows temporaries to be
01679 allocated. */
01680 #define TYPE_ARRAY_MAX_SIZE(ARRAY_TYPE) \
01681 (ARRAY_TYPE_CHECK (ARRAY_TYPE)->type.maxval)
01682
01683 /* For a VECTOR_TYPE, this is the number of sub-parts of the vector. */
01684 #define TYPE_VECTOR_SUBPARTS(VECTOR_TYPE) \
01685 (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision)
01686
01687 /* Indicates that objects of this type must be initialized by calling a
01688 function when they are created. */
01689 #define TYPE_NEEDS_CONSTRUCTING(NODE) \
01690 (TYPE_CHECK (NODE)->type.needs_constructing_flag)
01691
01692 /* Indicates that objects of this type (a UNION_TYPE), should be passed
01693 the same way that the first union alternative would be passed. */
01694 #define TYPE_TRANSPARENT_UNION(NODE) \
01695 (UNION_TYPE_CHECK (NODE)->type.transparent_union_flag)
01696
01697 /* For an ARRAY_TYPE, indicates that it is not permitted to
01698 take the address of a component of the type. */
01699 #define TYPE_NONALIASED_COMPONENT(NODE) \
01700 (ARRAY_TYPE_CHECK (NODE)->type.transparent_union_flag)
01701
01702 /* Indicated that objects of this type should be laid out in as
01703 compact a way as possible. */
01704 #define TYPE_PACKED(NODE) (TYPE_CHECK (NODE)->type.packed_flag)
01705
01706 /* Used by type_contains_placeholder_p to avoid recomputation.
01707 Values are: 0 (unknown), 1 (false), 2 (true). Never access
01708 this field directly. */
01709 #define TYPE_CONTAINS_PLACEHOLDER_INTERNAL(NODE) \
01710 (TYPE_CHECK (NODE)->type.contains_placeholder_bits)
01711
01712 struct die_struct;
01713
01714 struct tree_type GTY(())
01715 {
01716 struct tree_common common;
01717 tree values;
01718 tree size;
01719 tree size_unit;
01720 tree attributes;
01721 unsigned int uid;
01722
01723 unsigned int precision : 9;
01724 ENUM_BITFIELD(machine_mode) mode : 7;
01725
01726 unsigned string_flag : 1;
01727 unsigned no_force_blk_flag : 1;
01728 unsigned needs_constructing_flag : 1;
01729 unsigned transparent_union_flag : 1;
01730 unsigned packed_flag : 1;
01731 unsigned restrict_flag : 1;
01732 unsigned contains_placeholder_bits : 2;
01733
01734 unsigned lang_flag_0 : 1;
01735 unsigned lang_flag_1 : 1;
01736 unsigned lang_flag_2 : 1;
01737 unsigned lang_flag_3 : 1;
01738 unsigned lang_flag_4 : 1;
01739 unsigned lang_flag_5 : 1;
01740 unsigned lang_flag_6 : 1;
01741 unsigned user_align : 1;
01742
01743 unsigned int align;
01744 tree pointer_to;
01745 tree reference_to;
01746 union tree_type_symtab {
01747 int GTY ((tag ("0"))) address;
01748 char * GTY ((tag ("1"))) pointer;
01749 struct die_struct * GTY ((tag ("2"))) die;
01750 } GTY ((desc ("debug_hooks == &sdb_debug_hooks ? 1 : debug_hooks == &dwarf2_debug_hooks ? 2 : 0"),
01751 descbits ("2"))) symtab;
01752 tree name;
01753 tree minval;
01754 tree maxval;
01755 tree next_variant;
01756 tree main_variant;
01757 tree binfo;
01758 tree context;
01759 HOST_WIDE_INT alias_set;
01760 /* Points to a structure whose details depend on the language in use. */
01761 struct lang_type *lang_specific;
01762 };
01763
01764 /* Define accessor macros for information about type inheritance
01765 and basetypes.
01766
01767 A "basetype" means a particular usage of a data type for inheritance
01768 in another type. Each such basetype usage has its own "binfo"
01769 object to describe it. The binfo object is a TREE_VEC node.
01770
01771 Inheritance is represented by the binfo nodes allocated for a
01772 given type. For example, given types C and D, such that D is
01773 inherited by C, 3 binfo nodes will be allocated: one for describing
01774 the binfo properties of C, similarly one for D, and one for
01775 describing the binfo properties of D as a base type for C.
01776 Thus, given a pointer to class C, one can get a pointer to the binfo
01777 of D acting as a basetype for C by looking at C's binfo's basetypes. */
01778
01779 /* BINFO specific flags. */
01780
01781 /* Nonzero means that the derivation chain is via a `virtual' declaration. */
01782 #define BINFO_VIRTUAL_P(NODE) (TREE_BINFO_CHECK (NODE)->common.static_flag)
01783
01784 /* Flags for language dependent use. */
01785 #define BINFO_MARKED(NODE) TREE_LANG_FLAG_0(TREE_BINFO_CHECK(NODE))
01786 #define BINFO_FLAG_1(NODE) TREE_LANG_FLAG_1(TREE_BINFO_CHECK(NODE))
01787 #define BINFO_FLAG_2(NODE) TREE_LANG_FLAG_2(TREE_BINFO_CHECK(NODE))
01788 #define BINFO_FLAG_3(NODE) TREE_LANG_FLAG_3(TREE_BINFO_CHECK(NODE))
01789 #define BINFO_FLAG_4(NODE) TREE_LANG_FLAG_4(TREE_BINFO_CHECK(NODE))
01790 #define BINFO_FLAG_5(NODE) TREE_LANG_FLAG_5(TREE_BINFO_CHECK(NODE))
01791 #define BINFO_FLAG_6(NODE) TREE_LANG_FLAG_6(TREE_BINFO_CHECK(NODE))
01792
01793 /* The actual data type node being inherited in this basetype. */
01794 #define BINFO_TYPE(NODE) TREE_TYPE (TREE_BINFO_CHECK(NODE))
01795
01796 /* The offset where this basetype appears in its containing type.
01797 BINFO_OFFSET slot holds the offset (in bytes)
01798 from the base of the complete object to the base of the part of the
01799 object that is allocated on behalf of this `type'.
01800 This is always 0 except when there is multiple inheritance. */
01801
01802 #define BINFO_OFFSET(NODE) (TREE_BINFO_CHECK(NODE)->binfo.offset)
01803 #define BINFO_OFFSET_ZEROP(NODE) (integer_zerop (BINFO_OFFSET (NODE)))
01804
01805 /* The virtual function table belonging to this basetype. Virtual
01806 function tables provide a mechanism for run-time method dispatching.
01807 The entries of a virtual function table are language-dependent. */
01808
01809 #define BINFO_VTABLE(NODE) (TREE_BINFO_CHECK(NODE)->binfo.vtable)
01810
01811 /* The virtual functions in the virtual function table. This is
01812 a TREE_LIST that is used as an initial approximation for building
01813 a virtual function table for this basetype. */
01814 #define BINFO_VIRTUALS(NODE) (TREE_BINFO_CHECK(NODE)->binfo.virtuals)
01815
01816 /* A vector of binfos for the direct basetypes inherited by this
01817 basetype.
01818
01819 If this basetype describes type D as inherited in C, and if the
01820 basetypes of D are E and F, then this vector contains binfos for
01821 inheritance of E and F by C. */
01822 #define BINFO_BASE_BINFOS(NODE) (&TREE_BINFO_CHECK(NODE)->binfo.base_binfos)
01823
01824 /* The number of basetypes for NODE. */
01825 #define BINFO_N_BASE_BINFOS(NODE) (VEC_length (tree, BINFO_BASE_BINFOS (NODE)))
01826
01827 /* Accessor macro to get to the Nth base binfo of this binfo. */
01828 #define BINFO_BASE_BINFO(NODE,N) \
01829 (VEC_index (tree, BINFO_BASE_BINFOS (NODE), (N)))
01830 #define BINFO_BASE_ITERATE(NODE,N,B) \
01831 (VEC_iterate (tree, BINFO_BASE_BINFOS (NODE), (N), (B)))
01832 #define BINFO_BASE_APPEND(NODE,T) \
01833 (VEC_quick_push (tree, BINFO_BASE_BINFOS (NODE), (T)))
01834
01835 /* For a BINFO record describing a virtual base class, i.e., one where
01836 TREE_VIA_VIRTUAL is set, this field assists in locating the virtual
01837 base. The actual contents are language-dependent. In the C++
01838 front-end this field is an INTEGER_CST giving an offset into the
01839 vtable where the offset to the virtual base can be found. */
01840 #define BINFO_VPTR_FIELD(NODE) (TREE_BINFO_CHECK(NODE)->binfo.vptr_field)
01841
01842 /* Indicates the accesses this binfo has to its bases. The values are
01843 access_public_node, access_protected_node or access_private_node.
01844 If this array is not present, public access is implied. */
01845 #define BINFO_BASE_ACCESSES(NODE) (TREE_BINFO_CHECK(NODE)->binfo.base_accesses)
01846
01847 #define BINFO_BASE_ACCESS(NODE,N) \
01848 VEC_index (tree, BINFO_BASE_ACCESSES (NODE), (N))
01849 #define BINFO_BASE_ACCESS_APPEND(NODE,T) \
01850 VEC_quick_push (tree, BINFO_BASE_ACCESSES (NODE), (T))
01851
01852 /* The index in the VTT where this subobject's sub-VTT can be found.
01853 NULL_TREE if there is no sub-VTT. */
01854 #define BINFO_SUBVTT_INDEX(NODE) (TREE_BINFO_CHECK(NODE)->binfo.vtt_subvtt)
01855
01856 /* The index in the VTT where the vptr for this subobject can be
01857 found. NULL_TREE if there is no secondary vptr in the VTT. */
01858 #define BINFO_VPTR_INDEX(NODE) (TREE_BINFO_CHECK(NODE)->binfo.vtt_vptr)
01859
01860 /* The BINFO_INHERITANCE_CHAIN points at the binfo for the base
01861 inheriting this base for non-virtual bases. For virtual bases it
01862 points either to the binfo for which this is a primary binfo, or to
01863 the binfo of the most derived type. */
01864 #define BINFO_INHERITANCE_CHAIN(NODE) \
01865 (TREE_BINFO_CHECK(NODE)->binfo.inheritance)
01866
01867 struct tree_binfo GTY (())
01868 {
01869 struct tree_common common;
01870
01871 tree offset;
01872 tree vtable;
01873 tree virtuals;
01874 tree vptr_field;
01875 VEC(tree) *base_accesses;
01876 tree inheritance;
01877
01878 tree vtt_subvtt;
01879 tree vtt_vptr;
01880
01881 VEC(tree) base_binfos;
01882 };
01883
01884
01885 /* Define fields and accessors for nodes representing declared names. */
01886
01887 /* Nonzero if DECL represents a variable for the SSA passes. */
01888 #define SSA_VAR_P(DECL) \
01889 (TREE_CODE (DECL) == VAR_DECL \
01890 || TREE_CODE (DECL) == PARM_DECL \
01891 || TREE_CODE (DECL) == RESULT_DECL \
01892 || (TREE_CODE (DECL) == SSA_NAME \
01893 && (TREE_CODE (SSA_NAME_VAR (DECL)) == VAR_DECL \
01894 || TREE_CODE (SSA_NAME_VAR (DECL)) == PARM_DECL \
01895 || TREE_CODE (SSA_NAME_VAR (DECL)) == RESULT_DECL)))
01896
01897 /* This is the name of the object as written by the user.
01898 It is an IDENTIFIER_NODE. */
01899 #define DECL_NAME(NODE) (DECL_CHECK (NODE)->decl.name)
01900
01901 /* The name of the object as the assembler will see it (but before any
01902 translations made by ASM_OUTPUT_LABELREF). Often this is the same
01903 as DECL_NAME. It is an IDENTIFIER_NODE. */
01904 #define DECL_ASSEMBLER_NAME(NODE) decl_assembler_name (NODE)
01905
01906 /* Returns nonzero if the DECL_ASSEMBLER_NAME for NODE has been set. If zero,
01907 the NODE might still have a DECL_ASSEMBLER_NAME -- it just hasn't been set
01908 yet. */
01909 #define DECL_ASSEMBLER_NAME_SET_P(NODE) \
01910 (DECL_CHECK (NODE)->decl.assembler_name != NULL_TREE)
01911
01912 /* Set the DECL_ASSEMBLER_NAME for NODE to NAME. */
01913 #define SET_DECL_ASSEMBLER_NAME(NODE, NAME) \
01914 (DECL_CHECK (NODE)->decl.assembler_name = (NAME))
01915
01916 /* Copy the DECL_ASSEMBLER_NAME from DECL1 to DECL2. Note that if DECL1's
01917 DECL_ASSEMBLER_NAME has not yet been set, using this macro will not cause
01918 the DECL_ASSEMBLER_NAME of either DECL to be set. In other words, the
01919 semantics of using this macro, are different than saying:
01920
01921 SET_DECL_ASSEMBLER_NAME(DECL2, DECL_ASSEMBLER_NAME (DECL1))
01922
01923 which will try to set the DECL_ASSEMBLER_NAME for DECL1. */
01924
01925 #define COPY_DECL_ASSEMBLER_NAME(DECL1, DECL2) \
01926 (DECL_ASSEMBLER_NAME_SET_P (DECL1) \
01927 ? (void) SET_DECL_ASSEMBLER_NAME (DECL2, \
01928 DECL_ASSEMBLER_NAME (DECL1)) \
01929 : (void) 0)
01930
01931 /* Records the section name in a section attribute. Used to pass
01932 the name from decl_attributes to make_function_rtl and make_decl_rtl. */
01933 #define DECL_SECTION_NAME(NODE) (DECL_CHECK (NODE)->decl.section_name)
01934
01935 /* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
01936 QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL,
01937 PARM_DECL, FUNCTION_DECL, LABEL_DECL, and CONST_DECL nodes, this
01938 points to either the FUNCTION_DECL for the containing function,
01939 the RECORD_TYPE or UNION_TYPE for the containing type, or
01940 NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file
01941 scope". */
01942 #define DECL_CONTEXT(NODE) (DECL_CHECK (NODE)->decl.context)
01943 #define DECL_FIELD_CONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl.context)
01944 /* In a DECL this is the field where attributes are stored. */
01945 #define DECL_ATTRIBUTES(NODE) (DECL_CHECK (NODE)->decl.attributes)
01946 /* In a FIELD_DECL, this is the field position, counting in bytes, of the
01947 byte containing the bit closest to the beginning of the structure. */
01948 #define DECL_FIELD_OFFSET(NODE) (FIELD_DECL_CHECK (NODE)->decl.arguments)
01949 /* In a FIELD_DECL, this is the offset, in bits, of the first bit of the
01950 field from DECL_FIELD_OFFSET. */
01951 #define DECL_FIELD_BIT_OFFSET(NODE) (FIELD_DECL_CHECK (NODE)->decl.u2.t)
01952 /* In a FIELD_DECL, this indicates whether the field was a bit-field and
01953 if so, the type that was originally specified for it.
01954 TREE_TYPE may have been modified (in finish_struct). */
01955 #define DECL_BIT_FIELD_TYPE(NODE) (FIELD_DECL_CHECK (NODE)->decl.result)
01956 /* In FUNCTION_DECL, a chain of ..._DECL nodes.
01957 VAR_DECL and PARM_DECL reserve the arguments slot for language-specific
01958 uses. */
01959 #define DECL_ARGUMENTS(NODE) (DECL_CHECK (NODE)->decl.arguments)
01960 /* This field is used to reference anything in decl.result and is meant only
01961 for use by the garbage collector. */
01962 #define DECL_RESULT_FLD(NODE) (DECL_CHECK (NODE)->decl.result)
01963 /* In FUNCTION_DECL, holds the decl for the return value. */
01964 #define DECL_RESULT(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.result)
01965 /* For a TYPE_DECL, holds the "original" type. (TREE_TYPE has the copy.) */
01966 #define DECL_ORIGINAL_TYPE(NODE) (TYPE_DECL_CHECK (NODE)->decl.result)
01967 /* In PARM_DECL, holds the type as written (perhaps a function or array). */
01968 #define DECL_ARG_TYPE_AS_WRITTEN(NODE) (PARM_DECL_CHECK (NODE)->decl.result)
01969 /* For a FUNCTION_DECL, holds the tree of BINDINGs.
01970 For a TRANSLATION_UNIT_DECL, holds the namespace's BLOCK.
01971 For a VAR_DECL, holds the initial value.
01972 For a PARM_DECL, not used--default
01973 values for parameters are encoded in the type of the function,
01974 not in the PARM_DECL slot.
01975
01976 ??? Need to figure out some way to check this isn't a PARM_DECL. */
01977 #define DECL_INITIAL(NODE) (DECL_CHECK (NODE)->decl.initial)
01978
01979 /* For a PARM_DECL, records the data type used to pass the argument,
01980 which may be different from the type seen in the program. */
01981 #define DECL_ARG_TYPE(NODE) (PARM_DECL_CHECK (NODE)->decl.initial)
01982 /* For a FIELD_DECL in a QUAL_UNION_TYPE, records the expression, which
01983 if nonzero, indicates that the field occupies the type. */
01984 #define DECL_QUALIFIER(NODE) (FIELD_DECL_CHECK (NODE)->decl.initial)
01985 /* These two fields describe where in the source code the declaration
01986 was. If the declaration appears in several places (as for a C
01987 function that is declared first and then defined later), this
01988 information should refer to the definition. */
01989 #define DECL_SOURCE_LOCATION(NODE) (DECL_CHECK (NODE)->decl.locus)
01990 #define DECL_SOURCE_FILE(NODE) LOCATION_FILE (DECL_SOURCE_LOCATION (NODE))
01991 #define DECL_SOURCE_LINE(NODE) LOCATION_LINE (DECL_SOURCE_LOCATION (NODE))
01992 #ifdef USE_MAPPED_LOCATION
01993 #define DECL_IS_BUILTIN(DECL) \
01994 (DECL_SOURCE_LOCATION (DECL) <= BUILTINS_LOCATION)
01995 #else
01996 #define DECL_IS_BUILTIN(DECL) (DECL_SOURCE_LINE(DECL) == 0)
01997 #endif
01998 /* Holds the size of the datum, in bits, as a tree expression.
01999 Need not be constant. */
02000 #define DECL_SIZE(NODE) (DECL_CHECK (NODE)->decl.size)
02001 /* Likewise for the size in bytes. */
02002 #define DECL_SIZE_UNIT(NODE) (DECL_CHECK (NODE)->decl.size_unit)
02003 /* Holds the alignment required for the datum, in bits. */
02004 #define DECL_ALIGN(NODE) (DECL_CHECK (NODE)->decl.u1.a.align)
02005 /* The alignment of NODE, in bytes. */
02006 #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT)
02007 /* For FIELD_DECLs, off_align holds the number of low-order bits of
02008 DECL_FIELD_OFFSET which are known to be always zero.
02009 DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET
02010 has. */
02011 #define DECL_OFFSET_ALIGN(NODE) \
02012 (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl.u1.a.off_align)
02013 /* Specify that DECL_ALIGN(NODE) is a multiple of X. */
02014 #define SET_DECL_OFFSET_ALIGN(NODE, X) \
02015 (FIELD_DECL_CHECK (NODE)->decl.u1.a.off_align = exact_log2 ((X) & -(X)))
02016 /* 1 if the alignment for this type was requested by "aligned" attribute,
02017 0 if it is the default for this type. */
02018 #define DECL_USER_ALIGN(NODE) (DECL_CHECK (NODE)->decl.user_align)
02019 /* Holds the machine mode corresponding to the declaration of a variable or
02020 field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a
02021 FIELD_DECL. */
02022 #define DECL_MODE(NODE) (DECL_CHECK (NODE)->decl.mode)
02023 /* Holds the RTL expression for the value of a variable or function.
02024 This value can be evaluated lazily for functions, variables with
02025 static storage duration, and labels. */
02026 #define DECL_RTL(NODE) \
02027 (DECL_CHECK (NODE)->decl.rtl \
02028 ? (NODE)->decl.rtl \
02029 : (make_decl_rtl (NODE), (NODE)->decl.rtl))
02030 /* Set the DECL_RTL for NODE to RTL. */
02031 #define SET_DECL_RTL(NODE, RTL) set_decl_rtl (NODE, RTL)
02032 /* Returns nonzero if the DECL_RTL for NODE has already been set. */
02033 #define DECL_RTL_SET_P(NODE) (DECL_CHECK (NODE)->decl.rtl != NULL)
02034 /* Copy the RTL from NODE1 to NODE2. If the RTL was not set for
02035 NODE1, it will not be set for NODE2; this is a lazy copy. */
02036 #define COPY_DECL_RTL(NODE1, NODE2) \
02037 (DECL_CHECK (NODE2)->decl.rtl = DECL_CHECK (NODE1)->decl.rtl)
02038 /* The DECL_RTL for NODE, if it is set, or NULL, if it is not set. */
02039 #define DECL_RTL_IF_SET(NODE) (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL)
02040
02041 /* For PARM_DECL, holds an RTL for the stack slot or register
02042 where the data was actually passed. */
02043 #define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->decl.u2.r)
02044
02045 /* For FUNCTION_DECL, this holds a pointer to a structure ("struct function")
02046 that describes the status of this function. */
02047 #define DECL_STRUCT_FUNCTION(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u2.f)
02048
02049 /* For FUNCTION_DECL, if it is built-in, this identifies which built-in
02050 operation it is. Note, however, that this field is overloaded, with
02051 DECL_BUILT_IN_CLASS as the discriminant, so the latter must always be
02052 checked before any access to the former. */
02053 #define DECL_FUNCTION_CODE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u1.f)
02054
02055 /* The DECL_VINDEX is used for FUNCTION_DECLS in two different ways.
02056 Before the struct containing the FUNCTION_DECL is laid out,
02057 DECL_VINDEX may point to a FUNCTION_DECL in a base class which
02058 is the FUNCTION_DECL which this FUNCTION_DECL will replace as a virtual
02059 function. When the class is laid out, this pointer is changed
02060 to an INTEGER_CST node which is suitable for use as an index
02061 into the virtual function table. */
02062 #define DECL_VINDEX(NODE) (DECL_CHECK (NODE)->decl.vindex)
02063
02064 /* For FIELD_DECLS, DECL_FCONTEXT is the *first* baseclass in
02065 which this FIELD_DECL is defined. This information is needed when
02066 writing debugging information about vfield and vbase decls for C++. */
02067 #define DECL_FCONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl.vindex)
02068
02069 /* For VAR_DECL, this is set to either an expression that it was split
02070 from (if DECL_DEBUG_EXPR_IS_FROM is true), otherwise a tree_list of
02071 subexpressions that it was split into. */
02072 #define DECL_DEBUG_EXPR(NODE) (DECL_CHECK (NODE)->decl.vindex)
02073
02074 #ifdef KEY
02075 #define DECL_ASMREG(NODE) (DECL_CHECK (NODE)->decl.asmreg)
02076 #endif
02077
02078 #define DECL_DEBUG_EXPR_IS_FROM(NODE) \
02079 (DECL_CHECK (NODE)->decl.debug_expr_is_from)
02080
02081 /* Every ..._DECL node gets a unique number. */
02082 #define DECL_UID(NODE) (DECL_CHECK (NODE)->decl.uid)
02083
02084 /* For any sort of a ..._DECL node, this points to the original (abstract)
02085 decl node which this decl is an instance of, or else it is NULL indicating
02086 that this decl is not an instance of some other decl. For example,
02087 in a nested declaration of an inline function, this points back to the
02088 definition. */
02089 #define DECL_ABSTRACT_ORIGIN(NODE) (DECL_CHECK (NODE)->decl.abstract_origin)
02090
02091 /* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract
02092 origin. This is useful when setting the DECL_ABSTRACT_ORIGIN. */
02093 #define DECL_ORIGIN(NODE) \
02094 (DECL_ABSTRACT_ORIGIN (NODE) ? DECL_ABSTRACT_ORIGIN (NODE) : (NODE))
02095
02096 /* Nonzero for any sort of ..._DECL node means this decl node represents an
02097 inline instance of some original (abstract) decl from an inline function;
02098 suppress any warnings about shadowing some other variable. FUNCTION_DECL
02099 nodes can also have their abstract origin set to themselves. */
02100 #define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != NULL_TREE \
02101 && DECL_ABSTRACT_ORIGIN (NODE) != (NODE))
02102
02103 /* Nonzero if a _DECL means that the name of this decl should be ignored
02104 for symbolic debug purposes. */
02105 #define DECL_IGNORED_P(NODE) (DECL_CHECK (NODE)->decl.ignored_flag)
02106
02107 /* Nonzero for a given ..._DECL node means that this node represents an
02108 "abstract instance" of the given declaration (e.g. in the original
02109 declaration of an inline function). When generating symbolic debugging
02110 information, we mustn't try to generate any address information for nodes
02111 marked as "abstract instances" because we don't actually generate
02112 any code or allocate any data space for such instances. */
02113 #define DECL_ABSTRACT(NODE) (DECL_CHECK (NODE)->decl.abstract_flag)
02114
02115 /* Nonzero if a _DECL means that no warnings should be generated just
02116 because this decl is unused. */
02117 #define DECL_IN_SYSTEM_HEADER(NODE) \
02118 (DECL_CHECK (NODE)->decl.in_system_header_flag)
02119
02120 /* Nonzero for a given ..._DECL node means that this node should be
02121 put in .common, if possible. If a DECL_INITIAL is given, and it
02122 is not error_mark_node, then the decl cannot be put in .common. */
02123 #define DECL_COMMON(NODE) (DECL_CHECK (NODE)->decl.common_flag)
02124
02125 /* Language-specific decl information. */
02126 #define DECL_LANG_SPECIFIC(NODE) (DECL_CHECK (NODE)->decl.lang_specific)
02127
02128 /* In a VAR_DECL or FUNCTION_DECL,
02129 nonzero means external reference:
02130 do not allocate storage, and refer to a definition elsewhere. */
02131 #define DECL_EXTERNAL(NODE) (DECL_CHECK (NODE)->decl.external_flag)
02132
02133 /* In a VAR_DECL for a RECORD_TYPE, sets number for non-init_priority
02134 initializations. */
02135 #define DEFAULT_INIT_PRIORITY 65535
02136 #define MAX_INIT_PRIORITY 65535
02137 #define MAX_RESERVED_INIT_PRIORITY 100
02138
02139 /* In a TYPE_DECL
02140 nonzero means the detail info about this type is not dumped into stabs.
02141 Instead it will generate cross reference ('x') of names.
02142 This uses the same flag as DECL_EXTERNAL. */
02143 #define TYPE_DECL_SUPPRESS_DEBUG(NODE) \
02144 (TYPE_DECL_CHECK (NODE)->decl.external_flag)
02145
02146 /* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'. */
02147 #define DECL_REGISTER(NODE) (DECL_CHECK (NODE)->decl.regdecl_flag)
02148
02149 /* In LABEL_DECL nodes, nonzero means that an error message about
02150 jumping into such a binding contour has been printed for this label. */
02151 #define DECL_ERROR_ISSUED(NODE) (LABEL_DECL_CHECK (NODE)->decl.regdecl_flag)
02152
02153 /* In a FIELD_DECL, indicates this field should be bit-packed. */
02154 #define DECL_PACKED(NODE) (FIELD_DECL_CHECK (NODE)->decl.regdecl_flag)
02155
02156 /* In a FUNCTION_DECL with a nonzero DECL_CONTEXT, indicates that a
02157 static chain is not needed. */
02158 #define DECL_NO_STATIC_CHAIN(NODE) \
02159 (FUNCTION_DECL_CHECK (NODE)->decl.regdecl_flag)
02160
02161 /* Nonzero in a ..._DECL means this variable is ref'd from a nested function.
02162 For VAR_DECL nodes, PARM_DECL nodes, and FUNCTION_DECL nodes.
02163
02164 For LABEL_DECL nodes, nonzero if nonlocal gotos to the label are permitted.
02165
02166 Also set in some languages for variables, etc., outside the normal
02167 lexical scope, such as class instance variables. */
02168 #define DECL_NONLOCAL(NODE) (DECL_CHECK (NODE)->decl.nonlocal_flag)
02169
02170 /* Nonzero in a FUNCTION_DECL means this function can be substituted
02171 where it is called. */
02172 #define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inline_flag)
02173
02174 /* Nonzero in a FUNCTION_DECL means that this function was declared inline,
02175 such as via the `inline' keyword in C/C++. This flag controls the linkage
02176 semantics of 'inline'; whether or not the function is inlined is
02177 controlled by DECL_INLINE. */
02178 #define DECL_DECLARED_INLINE_P(NODE) \
02179 (FUNCTION_DECL_CHECK (NODE)->decl.declared_inline_flag)
02180
02181 /* Nonzero in a decl means that the gimplifier has seen (or placed)
02182 this variable in a BIND_EXPR. */
02183 #define DECL_SEEN_IN_BIND_EXPR_P(NODE) \
02184 (DECL_CHECK (NODE)->decl.seen_in_bind_expr)
02185
02186 /* In a VAR_DECL, nonzero if the decl is a register variable with
02187 an explicit asm specification. */
02188 #define DECL_HARD_REGISTER(NODE) (VAR_DECL_CHECK (NODE)->decl.inline_flag)
02189
02190 /* Value of the decls's visibility attribute */
02191 #define DECL_VISIBILITY(NODE) (DECL_CHECK (NODE)->decl.visibility)
02192
02193 /* Nonzero means that the decl had its visibility specified rather than
02194 being inferred. */
02195 #define DECL_VISIBILITY_SPECIFIED(NODE) (DECL_CHECK (NODE)->decl.visibility_specified)
02196
02197 /* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */
02198 #define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable)
02199
02200 /* In a VAR_DECL, nonzero if the data should be allocated from
02201 thread-local storage. */
02202 #define DECL_THREAD_LOCAL(NODE) (VAR_DECL_CHECK (NODE)->decl.thread_local_flag)
02203
02204 /* In a FUNCTION_DECL, the saved representation of the body of the
02205 entire function. */
02206 #define DECL_SAVED_TREE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.saved_tree)
02207
02208 /* In a VAR_DECL or PARM_DECL, the location at which the value may be found,
02209 if transformations have made this more complicated than evaluating the
02210 decl itself. This should only be used for debugging; once this field has
02211 been set, the decl itself may not legitimately appear in the function. */
02212 #define DECL_VALUE_EXPR(NODE) \
02213 (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl.saved_tree)
02214
02215 /* Nonzero in a FUNCTION_DECL means this function should be treated
02216 as if it were a malloc, meaning it returns a pointer that is
02217 not an alias. */
02218 #define DECL_IS_MALLOC(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.malloc_flag)
02219
02220 /* Nonzero in a FUNCTION_DECL means this function should be treated
02221 as "pure" function (like const function, but may read global memory). */
02222 #define DECL_IS_PURE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.pure_flag)
02223
02224 /* Nonzero in a FIELD_DECL means it is a bit field, and must be accessed
02225 specially. */
02226 #define DECL_BIT_FIELD(NODE) (FIELD_DECL_CHECK (NODE)->decl.bit_field_flag)
02227
02228 /* Unused in FUNCTION_DECL. */
02229
02230 /* In a VAR_DECL that's static,
02231 nonzero if the space is in the text section. */
02232 #define DECL_IN_TEXT_SECTION(NODE) (VAR_DECL_CHECK (NODE)->decl.bit_field_flag)
02233
02234 /* In a FUNCTION_DECL, nonzero means a built in function. */
02235 #define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN)
02236
02237 /* For a builtin function, identify which part of the compiler defined it. */
02238 #define DECL_BUILT_IN_CLASS(NODE) \
02239 (FUNCTION_DECL_CHECK (NODE)->decl.built_in_class)
02240
02241 /* Used in VAR_DECLs to indicate that the variable is a vtable.
02242 Used in FIELD_DECLs for vtable pointers.
02243 Used in FUNCTION_DECLs to indicate that the function is virtual. */
02244 #define DECL_VIRTUAL_P(NODE) (DECL_CHECK (NODE)->decl.virtual_flag)
02245
02246 /* Used to indicate that the linkage status of this DECL is not yet known,
02247 so it should not be output now. */
02248 #define DECL_DEFER_OUTPUT(NODE) (DECL_CHECK (NODE)->decl.defer_output)
02249
02250 /* Used in PARM_DECLs whose type are unions to indicate that the
02251 argument should be passed in the same way that the first union
02252 alternative would be passed. */
02253 #define DECL_TRANSPARENT_UNION(NODE) \
02254 (PARM_DECL_CHECK (NODE)->decl.transparent_union)
02255
02256 /* Used in FUNCTION_DECLs to indicate that they should be run automatically
02257 at the beginning or end of execution. */
02258 #define DECL_STATIC_CONSTRUCTOR(NODE) \
02259 (FUNCTION_DECL_CHECK (NODE)->decl.static_ctor_flag)
02260
02261 #define DECL_STATIC_DESTRUCTOR(NODE) \
02262 (FUNCTION_DECL_CHECK (NODE)->decl.static_dtor_flag)
02263
02264 /* Used to indicate that this DECL represents a compiler-generated entity. */
02265 #define DECL_ARTIFICIAL(NODE) (DECL_CHECK (NODE)->decl.artificial_flag)
02266
02267 /* Used to indicate that this DECL has weak linkage. */
02268 #define DECL_WEAK(NODE) (DECL_CHECK (NODE)->decl.weak_flag)
02269
02270 /* Used in TREE_PUBLIC decls to indicate that copies of this DECL in
02271 multiple translation units should be merged. */
02272 #define DECL_ONE_ONLY(NODE) (DECL_CHECK (NODE)->decl.transparent_union)
02273
02274 /* Used in a DECL to indicate that, even if it TREE_PUBLIC, it need
02275 not be put out unless it is needed in this translation unit.
02276 Entities like this are shared across translation units (like weak
02277 entities), but are guaranteed to be generated by any translation
02278 unit that needs them, and therefore need not be put out anywhere
02279 where they are not needed. DECL_COMDAT is just a hint to the
02280 back-end; it is up to front-ends which set this flag to ensure
02281 that there will never be any harm, other than bloat, in putting out
02282 something which is DECL_COMDAT. */
02283 #define DECL_COMDAT(NODE) (DECL_CHECK (NODE)->decl.comdat_flag)
02284
02285 /* Used in FUNCTION_DECLs to indicate that function entry and exit should
02286 be instrumented with calls to support routines. */
02287 #define DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT(NODE) \
02288 (FUNCTION_DECL_CHECK (NODE)->decl.no_instrument_function_entry_exit)
02289
02290 /* Used in FUNCTION_DECLs to indicate that limit-stack-* should be
02291 disabled in this function. */
02292 #define DECL_NO_LIMIT_STACK(NODE) \
02293 (FUNCTION_DECL_CHECK (NODE)->decl.no_limit_stack)
02294
02295 /* Additional flags for language-specific uses. */
02296 #define DECL_LANG_FLAG_0(NODE) (DECL_CHECK (NODE)->decl.lang_flag_0)
02297 #define DECL_LANG_FLAG_1(NODE) (DECL_CHECK (NODE)->decl.lang_flag_1)
02298 #define DECL_LANG_FLAG_2(NODE) (DECL_CHECK (NODE)->decl.lang_flag_2)
02299 #define DECL_LANG_FLAG_3(NODE) (DECL_CHECK (NODE)->decl.lang_flag_3)
02300 #define DECL_LANG_FLAG_4(NODE) (DECL_CHECK (NODE)->decl.lang_flag_4)
02301 #define DECL_LANG_FLAG_5(NODE) (DECL_CHECK (NODE)->decl.lang_flag_5)
02302 #define DECL_LANG_FLAG_6(NODE) (DECL_CHECK (NODE)->decl.lang_flag_6)
02303 #define DECL_LANG_FLAG_7(NODE) (DECL_CHECK (NODE)->decl.lang_flag_7)
02304
02305 /* Used to indicate that the pointer to this DECL cannot be treated as
02306 an address constant. */
02307 #define DECL_NON_ADDR_CONST_P(NODE) (DECL_CHECK (NODE)->decl.non_addr_const_p)
02308
02309 /* Used in a FIELD_DECL to indicate that we cannot form the address of
02310 this component. */
02311 #define DECL_NONADDRESSABLE_P(NODE) \
02312 (FIELD_DECL_CHECK (NODE)->decl.non_addressable)
02313
02314 /* Used to indicate an alias set for the memory pointed to by this
02315 particular FIELD_DECL, PARM_DECL, or VAR_DECL, which must have
02316 pointer (or reference) type. */
02317 #define DECL_POINTER_ALIAS_SET(NODE) \
02318 (DECL_CHECK (NODE)->decl.pointer_alias_set)
02319
02320
02321 /* A numeric unique identifier for a LABEL_DECL. The UID allocation is
02322 dense, unique within any one function, and may be used to index arrays.
02323 If the value is -1, then no UID has been assigned. */
02324 #define LABEL_DECL_UID(NODE) \
02325 (LABEL_DECL_CHECK (NODE)->decl.pointer_alias_set)
02326
02327 /* Nonzero if an alias set has been assigned to this declaration. */
02328 #define DECL_POINTER_ALIAS_SET_KNOWN_P(NODE) \
02329 (DECL_POINTER_ALIAS_SET (NODE) != - 1)
02330
02331 /* Nonzero for a decl which is at file scope. */
02332 #define DECL_FILE_SCOPE_P(EXP) \
02333 (! DECL_CONTEXT (EXP) \
02334 || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
02335
02336 /* Nonzero for a decl that cgraph has decided should be inlined into
02337 at least one call site. It is not meaningful to look at this
02338 directly; always use cgraph_function_possibly_inlined_p. */
02339 #define DECL_POSSIBLY_INLINED(DECL) \
02340 FUNCTION_DECL_CHECK (DECL)->decl.possibly_inlined
02341
02342 /* Nonzero for a decl that is decorated using attribute used.
02343 This indicates compiler tools that this decl needs to be preserved. */
02344 #define DECL_PRESERVE_P(DECL) \
02345 DECL_CHECK (DECL)->decl.preserve_flag
02346
02347 /* Internal to the gimplifier. Indicates that the value is a formal
02348 temporary controlled by the gimplifier. */
02349 #define DECL_GIMPLE_FORMAL_TEMP_P(DECL) \
02350 DECL_CHECK (DECL)->decl.gimple_formal_temp
02351
02352 #ifdef KEY
02353 #define DECL_EMITTED_BY_GXX(DECL) \
02354 DECL_CHECK (DECL)->decl.decl_emitted_by_gxx
02355 #define DECL_ADDED_TO_WEAK_DECLS(DECL) \
02356 DECL_CHECK (DECL)->decl.added_to_weak_decls
02357 #endif
02358
02359 /* Enumerate visibility settings. */
02360 #ifndef SYMBOL_VISIBILITY_DEFINED
02361 #define SYMBOL_VISIBILITY_DEFINED
02362 enum symbol_visibility
02363 {
02364 VISIBILITY_DEFAULT,
02365 VISIBILITY_INTERNAL,
02366 VISIBILITY_HIDDEN,
02367 VISIBILITY_PROTECTED
02368 };
02369 #endif
02370
02371 struct function;
02372 struct tree_decl GTY(())
02373 {
02374 struct tree_common common;
02375 location_t locus;
02376 unsigned int uid;
02377 tree size;
02378 ENUM_BITFIELD(machine_mode) mode : 8;
02379
02380 unsigned external_flag : 1;
02381 unsigned nonlocal_flag : 1;
02382 unsigned regdecl_flag : 1;
02383 unsigned inline_flag : 1;
02384 unsigned bit_field_flag : 1;
02385 unsigned virtual_flag : 1;
02386 unsigned ignored_flag : 1;
02387 unsigned abstract_flag : 1;
02388
02389 unsigned in_system_header_flag : 1;
02390 unsigned common_flag : 1;
02391 unsigned defer_output : 1;
02392 unsigned transparent_union : 1;
02393 unsigned static_ctor_flag : 1;
02394 unsigned static_dtor_flag : 1;
02395 unsigned artificial_flag : 1;
02396 unsigned weak_flag : 1;
02397
02398 unsigned non_addr_const_p : 1;
02399 unsigned no_instrument_function_entry_exit : 1;
02400 unsigned comdat_flag : 1;
02401 unsigned malloc_flag : 1;
02402 unsigned no_limit_stack : 1;
02403 ENUM_BITFIELD(built_in_class) built_in_class : 2;
02404 unsigned pure_flag : 1;
02405
02406 unsigned non_addressable : 1;
02407 unsigned user_align : 1;
02408 unsigned uninlinable : 1;
02409 unsigned thread_local_flag : 1;
02410 unsigned declared_inline_flag : 1;
02411 unsigned seen_in_bind_expr : 1;
02412 ENUM_BITFIELD(symbol_visibility) visibility : 2;
02413 unsigned visibility_specified : 1;
02414
02415 unsigned lang_flag_0 : 1;
02416 unsigned lang_flag_1 : 1;
02417 unsigned lang_flag_2 : 1;
02418 unsigned lang_flag_3 : 1;
02419 unsigned lang_flag_4 : 1;
02420 unsigned lang_flag_5 : 1;
02421 unsigned lang_flag_6 : 1;
02422 unsigned lang_flag_7 : 1;
02423
02424 unsigned possibly_inlined : 1;
02425 unsigned preserve_flag: 1;
02426 unsigned gimple_formal_temp : 1;
02427 unsigned debug_expr_is_from : 1;
02428 unsigned decl_emitted_by_gxx : 1; /* KEY */
02429 unsigned added_to_weak_decls : 1; /* KEY */
02430 /* KEY: 10 unused bits. (12 unused bits originally in GCC.) */
02431
02432 union tree_decl_u1 {
02433 /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
02434 DECL_FUNCTION_CODE. */
02435 enum built_in_function f;
02436 /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this
02437 is used by language-dependent code. */
02438 HOST_WIDE_INT i;
02439 /* DECL_ALIGN and DECL_OFFSET_ALIGN. (These are not used for
02440 FUNCTION_DECLs). */
02441 struct tree_decl_u1_a {
02442 unsigned int align : 24;
02443 unsigned int off_align : 8;
02444 } a;
02445 } GTY ((skip)) u1;
02446
02447 tree size_unit;
02448 tree name;
02449 tree context;
02450 tree arguments; /* Also used for DECL_FIELD_OFFSET */
02451 tree result; /* Also used for DECL_BIT_FIELD_TYPE */
02452 tree initial; /* Also used for DECL_QUALIFIER */
02453 tree abstract_origin;
02454 tree assembler_name;
02455 tree section_name;
02456 tree attributes;
02457 rtx rtl; /* RTL representation for object. */
02458
02459 /* In FUNCTION_DECL, if it is inline, holds the saved insn chain.
02460 In FIELD_DECL, is DECL_FIELD_BIT_OFFSET.
02461 In PARM_DECL, holds an RTL for the stack slot
02462 of register where the data was actually passed.
02463 Used by Chill and Java in LABEL_DECL and by C++ and Java in VAR_DECL. */
02464 union tree_decl_u2 {
02465 struct function * GTY ((tag ("FUNCTION_DECL"))) f;
02466 rtx GTY ((tag ("PARM_DECL"))) r;
02467 tree GTY ((tag ("FIELD_DECL"))) t;
02468 int GTY ((tag ("VAR_DECL"))) i;
02469 } GTY ((desc ("TREE_CODE((tree) &(%0))"))) u2;
02470
02471 /* In a FUNCTION_DECL, this is DECL_SAVED_TREE.
02472 In a VAR_DECL or PARM_DECL, this is DECL_VALUE_EXPR. */
02473 tree saved_tree;
02474 tree vindex;
02475 HOST_WIDE_INT pointer_alias_set;
02476 /* Points to a structure whose details depend on the language in use. */
02477 struct lang_decl *lang_specific;
02478
02479 int asmreg; /* KEY: asm register number */
02480 };
02481
02482
02483 /* A STATEMENT_LIST chains statements together in GENERIC and GIMPLE.
02484 To reduce overhead, the nodes containing the statements are not trees.
02485 This avoids the overhead of tree_common on all linked list elements.
02486
02487 Use the interface in tree-iterator.h to access this node. */
02488
02489 #define STATEMENT_LIST_HEAD(NODE) \
02490 (STATEMENT_LIST_CHECK (NODE)->stmt_list.head)
02491 #define STATEMENT_LIST_TAIL(NODE) \
02492 (STATEMENT_LIST_CHECK (NODE)->stmt_list.tail)
02493
02494 struct tree_statement_list_node
02495 GTY ((chain_next ("%h.next"), chain_prev ("%h.prev")))
02496 {
02497 struct tree_statement_list_node *prev;
02498 struct tree_statement_list_node *next;
02499 tree stmt;
02500 };
02501
02502 struct tree_statement_list
02503 GTY(())
02504 {
02505 struct tree_common common;
02506 struct tree_statement_list_node *head;
02507 struct tree_statement_list_node *tail;
02508 };
02509
02510 #define VALUE_HANDLE_ID(NODE) \
02511 (VALUE_HANDLE_CHECK (NODE)->value_handle.id)
02512
02513 #define VALUE_HANDLE_EXPR_SET(NODE) \
02514 (VALUE_HANDLE_CHECK (NODE)->value_handle.expr_set)
02515
02516 /* Defined and used in tree-ssa-pre.c. */
02517 struct value_set;
02518
02519 struct tree_value_handle GTY(())
02520 {
02521 struct tree_common common;
02522
02523 /* The set of expressions represented by this handle. */
02524 struct value_set * GTY ((skip)) expr_set;
02525
02526 /* Unique ID for this value handle. IDs are handed out in a
02527 conveniently dense form starting at 0, so that we can make
02528 bitmaps of value handles. */
02529 unsigned int id;
02530 };
02531
02532 enum tree_node_structure_enum {
02533 TS_COMMON,
02534 TS_INT_CST,
02535 TS_REAL_CST,
02536 TS_VECTOR,
02537 TS_STRING,
02538 TS_COMPLEX,
02539 TS_IDENTIFIER,
02540 TS_DECL,
02541 TS_TYPE,
02542 TS_LIST,
02543 TS_VEC,
02544 TS_EXP,
02545 TS_SSA_NAME,
02546 TS_PHI_NODE,
02547 TS_BLOCK,
02548 TS_BINFO,
02549 TS_STATEMENT_LIST,
02550 TS_VALUE_HANDLE,
02551 LAST_TS_ENUM
02552 };
02553
02554 /* Define the overall contents of a tree node.
02555 It may be any of the structures declared above
02556 for various types of node. */
02557
02558 union tree_node GTY ((ptr_alias (union lang_tree_node),
02559 desc ("tree_node_structure (&%h)")))
02560 {
02561 struct tree_common GTY ((tag ("TS_COMMON"))) common;
02562 struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst;
02563 struct tree_real_cst GTY ((tag ("TS_REAL_CST"))) real_cst;
02564 struct tree_vector GTY ((tag ("TS_VECTOR"))) vector;
02565 struct tree_string GTY ((tag ("TS_STRING"))) string;
02566 struct tree_complex GTY ((tag ("TS_COMPLEX"))) complex;
02567 struct tree_identifier GTY ((tag ("TS_IDENTIFIER"))) identifier;
02568 struct tree_decl GTY ((tag ("TS_DECL"))) decl;
02569 struct tree_type GTY ((tag ("TS_TYPE"))) type;
02570 struct tree_list GTY ((tag ("TS_LIST"))) list;
02571 struct tree_vec GTY ((tag ("TS_VEC"))) vec;
02572 struct tree_exp GTY ((tag ("TS_EXP"))) exp;
02573 struct tree_ssa_name GTY ((tag ("TS_SSA_NAME"))) ssa_name;
02574 struct tree_phi_node GTY ((tag ("TS_PHI_NODE"))) phi;
02575 struct tree_block GTY ((tag ("TS_BLOCK"))) block;
02576 struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo;
02577 struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
02578 struct tree_value_handle GTY ((tag ("TS_VALUE_HANDLE"))) value_handle;
02579 };
02580
02581 /* Standard named or nameless data types of the C compiler. */
02582
02583 enum tree_index
02584 {
02585 TI_ERROR_MARK,
02586 TI_INTQI_TYPE,
02587 TI_INTHI_TYPE,
02588 TI_INTSI_TYPE,
02589 TI_INTDI_TYPE,
02590 TI_INTTI_TYPE,
02591
02592 TI_UINTQI_TYPE,
02593 TI_UINTHI_TYPE,
02594 TI_UINTSI_TYPE,
02595 TI_UINTDI_TYPE,
02596 TI_UINTTI_TYPE,
02597
02598 TI_INTEGER_ZERO,
02599 TI_INTEGER_ONE,
02600 TI_INTEGER_MINUS_ONE,
02601 TI_NULL_POINTER,
02602
02603 TI_SIZE_ZERO,
02604 TI_SIZE_ONE,
02605
02606 TI_BITSIZE_ZERO,
02607 TI_BITSIZE_ONE,
02608 TI_BITSIZE_UNIT,
02609
02610 TI_PUBLIC,
02611 TI_PROTECTED,
02612 TI_PRIVATE,
02613
02614 TI_BOOLEAN_FALSE,
02615 TI_BOOLEAN_TRUE,
02616
02617 TI_COMPLEX_INTEGER_TYPE,
02618 TI_COMPLEX_FLOAT_TYPE,
02619 TI_COMPLEX_DOUBLE_TYPE,
02620 TI_COMPLEX_LONG_DOUBLE_TYPE,
02621
02622 TI_FLOAT_TYPE,
02623 TI_DOUBLE_TYPE,
02624 TI_LONG_DOUBLE_TYPE,
02625
02626 TI_FLOAT_PTR_TYPE,
02627 TI_DOUBLE_PTR_TYPE,
02628 TI_LONG_DOUBLE_PTR_TYPE,
02629 TI_INTEGER_PTR_TYPE,
02630
02631 TI_VOID_TYPE,
02632 TI_PTR_TYPE,
02633 TI_CONST_PTR_TYPE,
02634 TI_SIZE_TYPE,
02635 TI_PID_TYPE,
02636 TI_PTRDIFF_TYPE,
02637 TI_VA_LIST_TYPE,
02638 TI_BOOLEAN_TYPE,
02639 TI_FILEPTR_TYPE,
02640
02641 TI_VOID_LIST_NODE,
02642
02643 TI_MAIN_IDENTIFIER,
02644
02645 TI_MAX
02646 };
02647
02648 extern GTY(()) tree global_trees[TI_MAX];
02649
02650 #define error_mark_node global_trees[TI_ERROR_MARK]
02651
02652 #define intQI_type_node global_trees[TI_INTQI_TYPE]
02653 #define intHI_type_node global_trees[TI_INTHI_TYPE]
02654 #define intSI_type_node global_trees[TI_INTSI_TYPE]
02655 #define intDI_type_node global_trees[TI_INTDI_TYPE]
02656 #define intTI_type_node global_trees[TI_INTTI_TYPE]
02657
02658 #define unsigned_intQI_type_node global_trees[TI_UINTQI_TYPE]
02659 #define unsigned_intHI_type_node global_trees[TI_UINTHI_TYPE]
02660 #define unsigned_intSI_type_node global_trees[TI_UINTSI_TYPE]
02661 #define unsigned_intDI_type_node global_trees[TI_UINTDI_TYPE]
02662 #define unsigned_intTI_type_node global_trees[TI_UINTTI_TYPE]
02663
02664 #define integer_zero_node global_trees[TI_INTEGER_ZERO]
02665 #define integer_one_node global_trees[TI_INTEGER_ONE]
02666 #define integer_minus_one_node global_trees[TI_INTEGER_MINUS_ONE]
02667 #define size_zero_node global_trees[TI_SIZE_ZERO]
02668 #define size_one_node global_trees[TI_SIZE_ONE]
02669 #define bitsize_zero_node global_trees[TI_BITSIZE_ZERO]
02670 #define bitsize_one_node global_trees[TI_BITSIZE_ONE]
02671 #define bitsize_unit_node global_trees[TI_BITSIZE_UNIT]
02672
02673 /* Base access nodes. */
02674 #define access_public_node global_trees[TI_PUBLIC]
02675 #define access_protected_node global_trees[TI_PROTECTED]
02676 #define access_private_node global_trees[TI_PRIVATE]
02677
02678 #define null_pointer_node global_trees[TI_NULL_POINTER]
02679
02680 #define float_type_node global_trees[TI_FLOAT_TYPE]
02681 #define double_type_node global_trees[TI_DOUBLE_TYPE]
02682 #define long_double_type_node global_trees[TI_LONG_DOUBLE_TYPE]
02683
02684 #define float_ptr_type_node global_trees[TI_FLOAT_PTR_TYPE]
02685 #define double_ptr_type_node global_trees[TI_DOUBLE_PTR_TYPE]
02686 #define long_double_ptr_type_node global_trees[TI_LONG_DOUBLE_PTR_TYPE]
02687 #define integer_ptr_type_node global_trees[TI_INTEGER_PTR_TYPE]
02688
02689 #define complex_integer_type_node global_trees[TI_COMPLEX_INTEGER_TYPE]
02690 #define complex_float_type_node global_trees[TI_COMPLEX_FLOAT_TYPE]
02691 #define complex_double_type_node global_trees[TI_COMPLEX_DOUBLE_TYPE]
02692 #define complex_long_double_type_node global_trees[TI_COMPLEX_LONG_DOUBLE_TYPE]
02693
02694 #define void_type_node global_trees[TI_VOID_TYPE]
02695 /* The C type `void *'. */
02696 #define ptr_type_node global_trees[TI_PTR_TYPE]
02697 /* The C type `const void *'. */
02698 #define const_ptr_type_node global_trees[TI_CONST_PTR_TYPE]
02699 /* The C type `size_t'. */
02700 #define size_type_node global_trees[TI_SIZE_TYPE]
02701 #define pid_type_node global_trees[TI_PID_TYPE]
02702 #define ptrdiff_type_node global_trees[TI_PTRDIFF_TYPE]
02703 #define va_list_type_node global_trees[TI_VA_LIST_TYPE]
02704 /* The C type `FILE *'. */
02705 #define fileptr_type_node global_trees[TI_FILEPTR_TYPE]
02706
02707 #define boolean_type_node global_trees[TI_BOOLEAN_TYPE]
02708 #define boolean_false_node global_trees[TI_BOOLEAN_FALSE]
02709 #define boolean_true_node global_trees[TI_BOOLEAN_TRUE]
02710
02711 /* The node that should be placed at the end of a parameter list to
02712 indicate that the function does not take a variable number of
02713 arguments. The TREE_VALUE will be void_type_node and there will be
02714 no TREE_CHAIN. Language-independent code should not assume
02715 anything else about this node. */
02716 #define void_list_node global_trees[TI_VOID_LIST_NODE]
02717
02718 #define main_identifier_node global_trees[TI_MAIN_IDENTIFIER]
02719 #define MAIN_NAME_P(NODE) (IDENTIFIER_NODE_CHECK (NODE) == main_identifier_node)
02720
02721 /* An enumeration of the standard C integer types. These must be
02722 ordered so that shorter types appear before longer ones, and so
02723 that signed types appear before unsigned ones, for the correct
02724 functioning of interpret_integer() in c-lex.c. */
02725 enum integer_type_kind
02726 {
02727 itk_char,
02728 itk_signed_char,
02729 itk_unsigned_char,
02730 itk_short,
02731 itk_unsigned_short,
02732 itk_int,
02733 itk_unsigned_int,
02734 itk_long,
02735 itk_unsigned_long,
02736 itk_long_long,
02737 itk_unsigned_long_long,
02738 itk_none
02739 };
02740
02741 typedef enum integer_type_kind integer_type_kind;
02742
02743 /* The standard C integer types. Use integer_type_kind to index into
02744 this array. */
02745 extern GTY(()) tree integer_types[itk_none];
02746
02747 #define char_type_node integer_types[itk_char]
02748 #define signed_char_type_node integer_types[itk_signed_char]
02749 #define unsigned_char_type_node integer_types[itk_unsigned_char]
02750 #define short_integer_type_node integer_types[itk_short]
02751 #define short_unsigned_type_node integer_types[itk_unsigned_short]
02752 #define integer_type_node integer_types[itk_int]
02753 #define unsigned_type_node integer_types[itk_unsigned_int]
02754 #define long_integer_type_node integer_types[itk_long]
02755 #define long_unsigned_type_node integer_types[itk_unsigned_long]
02756 #define long_long_integer_type_node integer_types[itk_long_long]
02757 #define long_long_unsigned_type_node integer_types[itk_unsigned_long_long]
02758
02759 /* Set to the default thread-local storage (tls) model to use. */
02760
02761 extern enum tls_model flag_tls_default;
02762
02763
02764 /* A pointer-to-function member type looks like:
02765
02766 struct {
02767 __P __pfn;
02768 ptrdiff_t __delta;
02769 };
02770
02771 If __pfn is NULL, it is a NULL pointer-to-member-function.
02772
02773 (Because the vtable is always the first thing in the object, we
02774 don't need its offset.) If the function is virtual, then PFN is
02775 one plus twice the index into the vtable; otherwise, it is just a
02776 pointer to the function.
02777
02778 Unfortunately, using the lowest bit of PFN doesn't work in
02779 architectures that don't impose alignment requirements on function
02780 addresses, or that use the lowest bit to tell one ISA from another,
02781 for example. For such architectures, we use the lowest bit of
02782 DELTA instead of the lowest bit of the PFN, and DELTA will be
02783 multiplied by 2. */
02784
02785 enum ptrmemfunc_vbit_where_t
02786 {
02787 ptrmemfunc_vbit_in_pfn,
02788 ptrmemfunc_vbit_in_delta
02789 };
02790
02791 #define NULL_TREE (tree) NULL
02792
02793 extern GTY(()) tree frame_base_decl;
02794 extern tree decl_assembler_name (tree);
02795
02796 /* Compute the number of bytes occupied by 'node'. This routine only
02797 looks at TREE_CODE and, if the code is TREE_VEC, TREE_VEC_LENGTH. */
02798
02799 extern size_t tree_size (tree);
02800
02801 /* Compute the number of bytes occupied by a tree with code CODE. This
02802 function cannot be used for TREE_VEC or PHI_NODE codes, which are of
02803 variable length. */
02804 extern size_t tree_code_size (enum tree_code);
02805
02806 /* Lowest level primitive for allocating a node.
02807 The TREE_CODE is the only argument. Contents are initialized
02808 to zero except for a few of the common fields. */
02809
02810 extern tree make_node_stat (enum tree_code MEM_STAT_DECL);
02811 #define make_node(t) make_node_stat (t MEM_STAT_INFO)
02812
02813 /* Make a copy of a node, with all the same contents. */
02814
02815 extern tree copy_node_stat (tree MEM_STAT_DECL);
02816 #define copy_node(t) copy_node_stat (t MEM_STAT_INFO)
02817
02818 /* Make a copy of a chain of TREE_LIST nodes. */
02819
02820 extern tree copy_list (tree);
02821
02822 /* Make a BINFO. */
02823 extern tree make_tree_binfo_stat (unsigned MEM_STAT_DECL);
02824 #define make_tree_binfo(t) make_tree_binfo_stat (t MEM_STAT_INFO)
02825
02826 /* Make a TREE_VEC. */
02827
02828 extern tree make_tree_vec_stat (int MEM_STAT_DECL);
02829 #define make_tree_vec(t) make_tree_vec_stat (t MEM_STAT_INFO)
02830
02831 /* Tree nodes for SSA analysis. */
02832
02833 extern void init_phinodes (void);
02834 extern void fini_phinodes (void);
02835 extern void release_phi_node (tree);
02836 #ifdef GATHER_STATISTICS
02837 extern void phinodes_print_statistics (void);
02838 #endif
02839
02840 extern void init_ssanames (void);
02841 extern void fini_ssanames (void);
02842 extern tree make_ssa_name (tree, tree);
02843 extern tree duplicate_ssa_name (tree, tree);
02844 extern void release_ssa_name (tree);
02845 extern void release_defs (tree);
02846 extern void replace_ssa_name_symbol (tree, tree);
02847
02848 #ifdef GATHER_STATISTICS
02849 extern void ssanames_print_statistics (void);
02850 #endif
02851
02852 extern void mark_for_rewrite (tree);
02853 extern void unmark_all_for_rewrite (void);
02854 extern bool marked_for_rewrite_p (tree);
02855 extern bool any_marked_for_rewrite_p (void);
02856 extern struct bitmap_head_def *marked_ssa_names (void);
02857
02858
02859 /* Return the (unique) IDENTIFIER_NODE node for a given name.
02860 The name is supplied as a char *. */
02861
02862 extern tree get_identifier (const char *);
02863
02864 #if GCC_VERSION >= 3000
02865 #define get_identifier(str) \
02866 (__builtin_constant_p (str) \
02867 ? get_identifier_with_length ((str), strlen (str)) \
02868 : get_identifier (str))
02869 #endif
02870
02871
02872 /* Identical to get_identifier, except that the length is assumed
02873 known. */
02874
02875 extern tree get_identifier_with_length (const char *, size_t);
02876
02877 /* If an identifier with the name TEXT (a null-terminated string) has
02878 previously been referred to, return that node; otherwise return
02879 NULL_TREE. */
02880
02881 extern tree maybe_get_identifier (const char *);
02882
02883 /* Construct various types of nodes. */
02884
02885 extern tree build (enum tree_code, tree, ...);
02886 extern tree build_nt (enum tree_code, ...);
02887
02888 #if GCC_VERSION >= 3000 || __STDC_VERSION__ >= 199901L
02889 /* Use preprocessor trickery to map "build" to "buildN" where N is the
02890 expected number of arguments. This is used for both efficiency (no
02891 varargs), and checking (verifying number of passed arguments). */
02892 #define build(code, ...) \
02893 _buildN1(build, _buildC1(__VA_ARGS__))(code, __VA_ARGS__)
02894 #define _buildN1(BASE, X) _buildN2(BASE, X)
02895 #define _buildN2(BASE, X) BASE##X
02896 #define _buildC1(...) _buildC2(__VA_ARGS__,9,8,7,6,5,4,3,2,1,0,0)
02897 #define _buildC2(x,a1,a2,a3,a4,a5,a6,a7,a8,a9,c,...) c
02898 #endif
02899
02900 extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL);
02901 #define build0(c,t) build0_stat (c,t MEM_STAT_INFO)
02902 extern tree build1_stat (enum tree_code, tree, tree MEM_STAT_DECL);
02903 #define build1(c,t1,t2) build1_stat (c,t1,t2 MEM_STAT_INFO)
02904 extern tree build2_stat (enum tree_code, tree, tree, tree MEM_STAT_DECL);
02905 #define build2(c,t1,t2,t3) build2_stat (c,t1,t2,t3 MEM_STAT_INFO)
02906 extern tree build3_stat (enum tree_code, tree, tree, tree, tree MEM_STAT_DECL);
02907 #define build3(c,t1,t2,t3,t4) build3_stat (c,t1,t2,t3,t4 MEM_STAT_INFO)
02908 extern tree build4_stat (enum tree_code, tree, tree, tree, tree,
02909 tree MEM_STAT_DECL);
02910 #define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO)
02911
02912 extern tree build_int_cst (tree, HOST_WIDE_INT);
02913 extern tree build_int_cst_type (tree, HOST_WIDE_INT);
02914 extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT);
02915 extern tree build_int_cst_wide (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT);
02916 extern tree build_vector (tree, tree);
02917 extern tree build_constructor (tree, tree);
02918 extern tree build_real_from_int_cst (tree, tree);
02919 extern tree build_complex (tree, tree, tree);
02920 extern tree build_string (int, const char *);
02921 extern tree build_tree_list_stat (tree, tree MEM_STAT_DECL);
02922 #define build_tree_list(t,q) build_tree_list_stat(t,q MEM_STAT_INFO)
02923 extern tree build_decl_stat (enum tree_code, tree, tree MEM_STAT_DECL);
02924 #define build_decl(c,t,q) build_decl_stat (c,t,q MEM_STAT_INFO)
02925 extern tree build_block (tree, tree, tree, tree, tree);
02926 #ifndef USE_MAPPED_LOCATION
02927 extern void annotate_with_file_line (tree, const char *, int);
02928 extern void annotate_with_locus (tree, location_t);
02929 #endif
02930 extern tree build_empty_stmt (void);
02931
02932 /* Construct various nodes representing data types. */
02933
02934 extern tree make_signed_type (int);
02935 extern tree make_unsigned_type (int);
02936 extern tree signed_type_for (tree);
02937 extern tree unsigned_type_for (tree);
02938 extern void initialize_sizetypes (bool);
02939 extern void set_sizetype (tree);
02940 extern void fixup_unsigned_type (tree);
02941 extern tree build_pointer_type_for_mode (tree, enum machine_mode, bool);
02942 extern tree build_pointer_type (tree);
02943 extern tree build_reference_type_for_mode (tree, enum machine_mode, bool);
02944 extern tree build_reference_type (tree);
02945 extern tree build_vector_type_for_mode (tree, enum machine_mode);
02946 extern tree build_vector_type (tree innertype, int nunits);
02947 extern tree build_type_no_quals (tree);
02948 extern tree build_index_type (tree);
02949 extern tree build_index_2_type (tree, tree);
02950 extern tree build_array_type (tree, tree);
02951 extern tree build_function_type (tree, tree);
02952 extern tree build_function_type_list (tree, ...);
02953 extern tree build_method_type_directly (tree, tree, tree);
02954 extern tree build_method_type (tree, tree);
02955 extern tree build_offset_type (tree, tree);
02956 extern tree build_complex_type (tree);
02957 extern tree array_type_nelts (tree);
02958 extern bool in_array_bounds_p (tree);
02959
02960 extern tree value_member (tree, tree);
02961 extern tree purpose_member (tree, tree);
02962
02963 extern int attribute_list_equal (tree, tree);
02964 extern int attribute_list_contained (tree, tree);
02965 extern int tree_int_cst_equal (tree, tree);
02966 extern int tree_int_cst_lt (tree, tree);
02967 extern int tree_int_cst_compare (tree, tree);
02968 extern int host_integerp (tree, int);
02969 extern HOST_WIDE_INT tree_low_cst (tree, int);
02970 extern int tree_int_cst_msb (tree);
02971 extern int tree_int_cst_sgn (tree);
02972 extern int tree_expr_nonnegative_p (tree);
02973 extern bool may_negate_without_overflow_p (tree);
02974 extern tree get_inner_array_type (tree);
02975
02976 /* From expmed.c. Since rtl.h is included after tree.h, we can't
02977 put the prototype here. Rtl.h does declare the prototype if
02978 tree.h had been included. */
02979
02980 extern tree make_tree (tree, rtx);
02981
02982 /* Return a type like TTYPE except that its TYPE_ATTRIBUTES
02983 is ATTRIBUTE.
02984
02985 Such modified types already made are recorded so that duplicates
02986 are not made. */
02987
02988 extern tree build_type_attribute_variant (tree, tree);
02989 extern tree build_decl_attribute_variant (tree, tree);
02990
02991 /* Structure describing an attribute and a function to handle it. */
02992 struct attribute_spec
02993 {
02994 /* The name of the attribute (without any leading or trailing __),
02995 or NULL to mark the end of a table of attributes. */
02996 const char *const name;
02997 /* The minimum length of the list of arguments of the attribute. */
02998 const int min_length;
02999 /* The maximum length of the list of arguments of the attribute
03000 (-1 for no maximum). */
03001 const int max_length;
03002 /* Whether this attribute requires a DECL. If it does, it will be passed
03003 from types of DECLs, function return types and array element types to
03004 the DECLs, function types and array types respectively; but when
03005 applied to a type in any other circumstances, it will be ignored with
03006 a warning. (If greater control is desired for a given attribute,
03007 this should be false, and the flags argument to the handler may be
03008 used to gain greater control in that case.) */
03009 const bool decl_required;
03010 /* Whether this attribute requires a type. If it does, it will be passed
03011 from a DECL to the type of that DECL. */
03012 const bool type_required;
03013 /* Whether this attribute requires a function (or method) type. If it does,
03014 it will be passed from a function pointer type to the target type,
03015 and from a function return type (which is not itself a function
03016 pointer type) to the function type. */
03017 const bool function_type_required;
03018 /* Function to handle this attribute. NODE points to the node to which
03019 the attribute is to be applied. If a DECL, it should be modified in
03020 place; if a TYPE, a copy should be created. NAME is the name of the
03021 attribute (possibly with leading or trailing __). ARGS is the TREE_LIST
03022 of the arguments (which may be NULL). FLAGS gives further information
03023 about the context of the attribute. Afterwards, the attributes will
03024 be added to the DECL_ATTRIBUTES or TYPE_ATTRIBUTES, as appropriate,
03025 unless *NO_ADD_ATTRS is set to true (which should be done on error,
03026 as well as in any other cases when the attributes should not be added
03027 to the DECL or TYPE). Depending on FLAGS, any attributes to be
03028 applied to another type or DECL later may be returned;
03029 otherwise the return value should be NULL_TREE. This pointer may be
03030 NULL if no special handling is required beyond the checks implied
03031 by the rest of this structure. */
03032 tree (*const handler) (tree *node, tree name, tree args,
03033 int flags, bool *no_add_attrs);
03034 };
03035
03036 /* Flags that may be passed in the third argument of decl_attributes, and
03037 to handler functions for attributes. */
03038 enum attribute_flags
03039 {
03040 /* The type passed in is the type of a DECL, and any attributes that
03041 should be passed in again to be applied to the DECL rather than the
03042 type should be returned. */
03043 ATTR_FLAG_DECL_NEXT = 1,
03044 /* The type passed in is a function return type, and any attributes that
03045 should be passed in again to be applied to the function type rather
03046 than the return type should be returned. */
03047 ATTR_FLAG_FUNCTION_NEXT = 2,
03048 /* The type passed in is an array element type, and any attributes that
03049 should be passed in again to be applied to the array type rather
03050 than the element type should be returned. */
03051 ATTR_FLAG_ARRAY_NEXT = 4,
03052 /* The type passed in is a structure, union or enumeration type being
03053 created, and should be modified in place. */
03054 ATTR_FLAG_TYPE_IN_PLACE = 8,
03055 /* The attributes are being applied by default to a library function whose
03056 name indicates known behavior, and should be silently ignored if they
03057 are not in fact compatible with the function type. */
03058 ATTR_FLAG_BUILT_IN = 16
03059 };
03060
03061 /* Default versions of target-overridable functions. */
03062
03063 extern tree merge_decl_attributes (tree, tree);
03064 extern tree merge_type_attributes (tree, tree);
03065
03066 /* Given a tree node and a string, return nonzero if the tree node is
03067 a valid attribute name for the string. */
03068
03069 extern int is_attribute_p (const char *, tree);
03070
03071 /* Given an attribute name and a list of attributes, return the list element
03072 of the attribute or NULL_TREE if not found. */
03073
03074 extern tree lookup_attribute (const char *, tree);
03075
03076 /* Given two attributes lists, return a list of their union. */
03077
03078 extern tree merge_attributes (tree, tree);
03079
03080 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
03081 /* Given two Windows decl attributes lists, possibly including
03082 dllimport, return a list of their union . */
03083 extern tree merge_dllimport_decl_attributes (tree, tree);
03084
03085 /* Handle a "dllimport" or "dllexport" attribute. */
03086 extern tree handle_dll_attribute (tree *, tree, tree, int, bool *);
03087 #endif
03088
03089 /* Check whether CAND is suitable to be returned from get_qualified_type
03090 (BASE, TYPE_QUALS). */
03091
03092 extern bool check_qualified_type (tree, tree, int);
03093
03094 /* Return a version of the TYPE, qualified as indicated by the
03095 TYPE_QUALS, if one exists. If no qualified version exists yet,
03096 return NULL_TREE. */
03097
03098 extern tree get_qualified_type (tree, int);
03099
03100 /* Like get_qualified_type, but creates the type if it does not
03101 exist. This function never returns NULL_TREE. */
03102
03103 extern tree build_qualified_type (tree, int);
03104
03105 /* Like build_qualified_type, but only deals with the `const' and
03106 `volatile' qualifiers. This interface is retained for backwards
03107 compatibility with the various front-ends; new code should use
03108 build_qualified_type instead. */
03109
03110 #define build_type_variant(TYPE, CONST_P, VOLATILE_P) \
03111 build_qualified_type ((TYPE), \
03112 ((CONST_P) ? TYPE_QUAL_CONST : 0) \
03113 | ((VOLATILE_P) ? TYPE_QUAL_VOLATILE : 0))
03114
03115 /* Make a copy of a type node. */
03116
03117 extern tree build_distinct_type_copy (tree);
03118 extern tree build_variant_type_copy (tree);
03119
03120 /* Finish up a builtin RECORD_TYPE. Give it a name and provide its
03121 fields. Optionally specify an alignment, and then lay it out. */
03122
03123 extern void finish_builtin_struct (tree, const char *,
03124 tree, tree);
03125
03126 /* Given a ..._TYPE node, calculate the TYPE_SIZE, TYPE_SIZE_UNIT,
03127 TYPE_ALIGN and TYPE_MODE fields. If called more than once on one
03128 node, does nothing except for the first time. */
03129
03130 extern void layout_type (tree);
03131
03132 /* These functions allow a front-end to perform a manual layout of a
03133 RECORD_TYPE. (For instance, if the placement of subsequent fields
03134 depends on the placement of fields so far.) Begin by calling
03135 start_record_layout. Then, call place_field for each of the
03136 fields. Then, call finish_record_layout. See layout_type for the
03137 default way in which these functions are used. */
03138
03139 typedef struct record_layout_info_s
03140 {
03141 /* The RECORD_TYPE that we are laying out. */
03142 tree t;
03143 /* The offset into the record so far, in bytes, not including bits in
03144 BITPOS. */
03145 tree offset;
03146 /* The last known alignment of SIZE. */
03147 unsigned int offset_align;
03148 /* The bit position within the last OFFSET_ALIGN bits, in bits. */
03149 tree bitpos;
03150 /* The alignment of the record so far, in bits. */
03151 unsigned int record_align;
03152 /* The alignment of the record so far, ignoring #pragma pack and
03153 __attribute__ ((packed)), in bits. */
03154 unsigned int unpacked_align;
03155 /* The previous field layed out. */
03156 tree prev_field;
03157 /* The static variables (i.e., class variables, as opposed to
03158 instance variables) encountered in T. */
03159 tree pending_statics;
03160 /* Bits remaining in the current alignment group */
03161 int remaining_in_alignment;
03162 /* True if we've seen a packed field that didn't have normal
03163 alignment anyway. */
03164 int packed_maybe_necessary;
03165 } *record_layout_info;
03166
03167 extern void set_lang_adjust_rli (void (*) (record_layout_info));
03168 extern record_layout_info start_record_layout (tree);
03169 extern tree bit_from_pos (tree, tree);
03170 extern tree byte_from_pos (tree, tree);
03171 extern void pos_from_bit (tree *, tree *, unsigned int, tree);
03172 extern void normalize_offset (tree *, tree *, unsigned int);
03173 extern tree rli_size_unit_so_far (record_layout_info);
03174 extern tree rli_size_so_far (record_layout_info);
03175 extern void normalize_rli (record_layout_info);
03176 extern void place_field (record_layout_info, tree);
03177 extern void compute_record_mode (tree);
03178 extern void finish_record_layout (record_layout_info, int);
03179
03180 /* Given a hashcode and a ..._TYPE node (for which the hashcode was made),
03181 return a canonicalized ..._TYPE node, so that duplicates are not made.
03182 How the hash code is computed is up to the caller, as long as any two
03183 callers that could hash identical-looking type nodes agree. */
03184
03185 extern tree type_hash_canon (unsigned int, tree);
03186
03187 /* Given a VAR_DECL, PARM_DECL, RESULT_DECL or FIELD_DECL node,
03188 calculates the DECL_SIZE, DECL_SIZE_UNIT, DECL_ALIGN and DECL_MODE
03189 fields. Call this only once for any given decl node.
03190
03191 Second argument is the boundary that this field can be assumed to
03192 be starting at (in bits). Zero means it can be assumed aligned
03193 on any boundary that may be needed. */
03194
03195 extern void layout_decl (tree, unsigned);
03196
03197 /* Given a VAR_DECL, PARM_DECL or RESULT_DECL, clears the results of
03198 a previous call to layout_decl and calls it again. */
03199
03200 extern void relayout_decl (tree);
03201
03202 /* Return the mode for data of a given size SIZE and mode class CLASS.
03203 If LIMIT is nonzero, then don't use modes bigger than MAX_FIXED_MODE_SIZE.
03204 The value is BLKmode if no other mode is found. This is like
03205 mode_for_size, but is passed a tree. */
03206
03207 extern enum machine_mode mode_for_size_tree (tree, enum mode_class, int);
03208
03209 /* Return an expr equal to X but certainly not valid as an lvalue. */
03210
03211 extern tree non_lvalue (tree);
03212
03213 extern tree convert (tree, tree);
03214 extern unsigned int expr_align (tree);
03215 extern tree expr_first (tree);
03216 extern tree expr_last (tree);
03217 extern tree expr_only (tree);
03218 extern tree size_in_bytes (tree);
03219 extern HOST_WIDE_INT int_size_in_bytes (tree);
03220 extern tree bit_position (tree);
03221 extern HOST_WIDE_INT int_bit_position (tree);
03222 extern tree byte_position (tree);
03223 extern HOST_WIDE_INT int_byte_position (tree);
03224
03225 /* Define data structures, macros, and functions for handling sizes
03226 and the various types used to represent sizes. */
03227
03228 enum size_type_kind
03229 {
03230 SIZETYPE, /* Normal representation of sizes in bytes. */
03231 SSIZETYPE, /* Signed representation of sizes in bytes. */
03232 BITSIZETYPE, /* Normal representation of sizes in bits. */
03233 SBITSIZETYPE, /* Signed representation of sizes in bits. */
03234 TYPE_KIND_LAST};
03235
03236 extern GTY(()) tree sizetype_tab[(int) TYPE_KIND_LAST];
03237
03238 #define sizetype sizetype_tab[(int) SIZETYPE]
03239 #define bitsizetype sizetype_tab[(int) BITSIZETYPE]
03240 #define ssizetype sizetype_tab[(int) SSIZETYPE]
03241 #define sbitsizetype sizetype_tab[(int) SBITSIZETYPE]
03242
03243 extern tree size_int_kind (HOST_WIDE_INT, enum size_type_kind);
03244 extern tree size_binop (enum tree_code, tree, tree);
03245 extern tree size_diffop (tree, tree);
03246
03247 #define size_int(L) size_int_kind (L, SIZETYPE)
03248 #define ssize_int(L) size_int_kind (L, SSIZETYPE)
03249 #define bitsize_int(L) size_int_kind (L, BITSIZETYPE)
03250 #define sbitsize_int(L) size_int_kind (L, SBITSIZETYPE)
03251
03252 extern tree round_up (tree, int);
03253 extern tree round_down (tree, int);
03254 extern tree get_pending_sizes (void);
03255 extern void put_pending_size (tree);
03256 extern void put_pending_sizes (tree);
03257
03258 /* Type for sizes of data-type. */
03259
03260 #define BITS_PER_UNIT_LOG \
03261 ((BITS_PER_UNIT > 1) + (BITS_PER_UNIT > 2) + (BITS_PER_UNIT > 4) \
03262 + (BITS_PER_UNIT > 8) + (BITS_PER_UNIT > 16) + (BITS_PER_UNIT > 32) \
03263 + (BITS_PER_UNIT > 64) + (BITS_PER_UNIT > 128) + (BITS_PER_UNIT > 256))
03264
03265 /* If nonzero, an upper limit on alignment of structure fields, in bits, */
03266 extern unsigned int maximum_field_alignment;
03267 /* and its original value in bytes, specified via -fpack-struct=<value>. */
03268 extern unsigned int initial_max_fld_align;
03269
03270 /* If nonzero, the alignment of a bitstring or (power-)set value, in bits. */
03271 extern unsigned int set_alignment;
03272
03273 /* Concatenate two lists (chains of TREE_LIST nodes) X and Y
03274 by making the last node in X point to Y.
03275 Returns X, except if X is 0 returns Y. */
03276
03277 extern tree chainon (tree, tree);
03278
03279 /* Make a new TREE_LIST node from specified PURPOSE, VALUE and CHAIN. */
03280
03281 extern tree tree_cons_stat (tree, tree, tree MEM_STAT_DECL);
03282 #define tree_cons(t,q,w) tree_cons_stat (t,q,w MEM_STAT_INFO)
03283
03284 /* Return the last tree node in a chain. */
03285
03286 extern tree tree_last (tree);
03287
03288 /* Reverse the order of elements in a chain, and return the new head. */
03289
03290 extern tree nreverse (tree);
03291
03292 /* Returns the length of a chain of nodes
03293 (number of chain pointers to follow before reaching a null pointer). */
03294
03295 extern int list_length (tree);
03296
03297 /* Returns the number of FIELD_DECLs in a type. */
03298
03299 extern int fields_length (tree);
03300
03301 /* Given an initializer INIT, return TRUE if INIT is zero or some
03302 aggregate of zeros. Otherwise return FALSE. */
03303
03304 extern bool initializer_zerop (tree);
03305
03306 extern void categorize_ctor_elements (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
03307 HOST_WIDE_INT *, bool *);
03308 extern HOST_WIDE_INT count_type_elements (tree);
03309
03310 /* add_var_to_bind_expr (bind_expr, var) binds var to bind_expr. */
03311
03312 extern void add_var_to_bind_expr (tree, tree);
03313
03314 /* integer_zerop (tree x) is nonzero if X is an integer constant of value 0. */
03315
03316 extern int integer_zerop (tree);
03317
03318 /* integer_onep (tree x) is nonzero if X is an integer constant of value 1. */
03319
03320 extern int integer_onep (tree);
03321
03322 /* integer_all_onesp (tree x) is nonzero if X is an integer constant
03323 all of whose significant bits are 1. */
03324
03325 extern int integer_all_onesp (tree);
03326
03327 /* integer_pow2p (tree x) is nonzero is X is an integer constant with
03328 exactly one bit 1. */
03329
03330 extern int integer_pow2p (tree);
03331
03332 /* integer_nonzerop (tree x) is nonzero if X is an integer constant
03333 with a nonzero value. */
03334
03335 extern int integer_nonzerop (tree);
03336
03337 extern bool zero_p (tree);
03338 extern bool cst_and_fits_in_hwi (tree);
03339 extern tree num_ending_zeros (tree);
03340
03341 /* staticp (tree x) is nonzero if X is a reference to data allocated
03342 at a fixed address in memory. Returns the outermost data. */
03343
03344 extern tree staticp (tree);
03345
03346 /* save_expr (EXP) returns an expression equivalent to EXP
03347 but it can be used multiple times within context CTX
03348 and only evaluate EXP once. */
03349
03350 extern tree save_expr (tree);
03351
03352 /* Look inside EXPR and into any simple arithmetic operations. Return
03353 the innermost non-arithmetic node. */
03354
03355 extern tree skip_simple_arithmetic (tree);
03356
03357 /* Return which tree structure is used by T. */
03358
03359 enum tree_node_structure_enum tree_node_structure (tree);
03360
03361 /* Return 1 if EXP contains a PLACEHOLDER_EXPR; i.e., if it represents a size
03362 or offset that depends on a field within a record.
03363
03364 Note that we only allow such expressions within simple arithmetic
03365 or a COND_EXPR. */
03366
03367 extern bool contains_placeholder_p (tree);
03368
03369 /* This macro calls the above function but short-circuits the common
03370 case of a constant to save time. Also check for null. */
03371
03372 #define CONTAINS_PLACEHOLDER_P(EXP) \
03373 ((EXP) != 0 && ! TREE_CONSTANT (EXP) && contains_placeholder_p (EXP))
03374
03375 /* Return 1 if any part of the computation of TYPE involves a PLACEHOLDER_EXPR.
03376 This includes size, bounds, qualifiers (for QUAL_UNION_TYPE) and field
03377 positions. */
03378
03379 extern bool type_contains_placeholder_p (tree);
03380
03381 /* Given a tree EXP, a FIELD_DECL F, and a replacement value R,
03382 return a tree with all occurrences of references to F in a
03383 PLACEHOLDER_EXPR replaced by R. Note that we assume here that EXP
03384 contains only arithmetic expressions. */
03385
03386 extern tree substitute_in_expr (tree, tree, tree);
03387
03388 /* This macro calls the above function but short-circuits the common
03389 case of a constant to save time and also checks for NULL. */
03390
03391 #define SUBSTITUTE_IN_EXPR(EXP, F, R) \
03392 ((EXP) == 0 || TREE_CONSTANT (EXP) ? (EXP) : substitute_in_expr (EXP, F, R))
03393
03394 /* Similar, but look for a PLACEHOLDER_EXPR in EXP and find a replacement
03395 for it within OBJ, a tree that is an object or a chain of references. */
03396
03397 extern tree substitute_placeholder_in_expr (tree, tree);
03398
03399 /* This macro calls the above function but short-circuits the common
03400 case of a constant to save time and also checks for NULL. */
03401
03402 #define SUBSTITUTE_PLACEHOLDER_IN_EXPR(EXP, OBJ) \
03403 ((EXP) == 0 || TREE_CONSTANT (EXP) ? (EXP) \
03404 : substitute_placeholder_in_expr (EXP, OBJ))
03405
03406 /* variable_size (EXP) is like save_expr (EXP) except that it
03407 is for the special case of something that is part of a
03408 variable size for a data type. It makes special arrangements
03409 to compute the value at the right time when the data type
03410 belongs to a function parameter. */
03411
03412 extern tree variable_size (tree);
03413
03414 /* stabilize_reference (EXP) returns a reference equivalent to EXP
03415 but it can be used multiple times
03416 and only evaluate the subexpressions once. */
03417
03418 extern tree stabilize_reference (tree);
03419
03420 /* Subroutine of stabilize_reference; this is called for subtrees of
03421 references. Any expression with side-effects must be put in a SAVE_EXPR
03422 to ensure that it is only evaluated once. */
03423
03424 extern tree stabilize_reference_1 (tree);
03425
03426 /* Return EXP, stripped of any conversions to wider types
03427 in such a way that the result of converting to type FOR_TYPE
03428 is the same as if EXP were converted to FOR_TYPE.
03429 If FOR_TYPE is 0, it signifies EXP's type. */
03430
03431 extern tree get_unwidened (tree, tree);
03432
03433 /* Return OP or a simpler expression for a narrower value
03434 which can be sign-extended or zero-extended to give back OP.
03435 Store in *UNSIGNEDP_PTR either 1 if the value should be zero-extended
03436 or 0 if the value should be sign-extended. */
03437
03438 extern tree get_narrower (tree, int *);
03439
03440 /* Given an expression EXP that may be a COMPONENT_REF or an ARRAY_REF,
03441 look for nested component-refs or array-refs at constant positions
03442 and find the ultimate containing object, which is returned. */
03443
03444 extern tree get_inner_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
03445 tree *, enum machine_mode *, int *, int *,
03446 bool);
03447
03448 /* Return 1 if T is an expression that get_inner_reference handles. */
03449
03450 extern int handled_component_p (tree);
03451
03452 /* Return a tree of sizetype representing the size, in bytes, of the element
03453 of EXP, an ARRAY_REF. */
03454
03455 extern tree array_ref_element_size (tree);
03456
03457 /* Return a tree representing the lower bound of the array mentioned in
03458 EXP, an ARRAY_REF. */
03459
03460 extern tree array_ref_low_bound (tree);
03461
03462 /* Return a tree representing the upper bound of the array mentioned in
03463 EXP, an ARRAY_REF. */
03464
03465 extern tree array_ref_up_bound (tree);
03466
03467 /* Return a tree representing the offset, in bytes, of the field referenced
03468 by EXP. This does not include any offset in DECL_FIELD_BIT_OFFSET. */
03469
03470 extern tree component_ref_field_offset (tree);
03471
03472 /* Given a DECL or TYPE, return the scope in which it was declared, or
03473 NUL_TREE if there is no containing scope. */
03474
03475 extern tree get_containing_scope (tree);
03476
03477 /* Return the FUNCTION_DECL which provides this _DECL with its context,
03478 or zero if none. */
03479 extern tree decl_function_context (tree);
03480
03481 /* Return the RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE which provides
03482 this _DECL with its context, or zero if none. */
03483 extern tree decl_type_context (tree);
03484
03485 /* Return 1 if EXPR is the real constant zero. */
03486 extern int real_zerop (tree);
03487
03488 /* Declare commonly used variables for tree structure. */
03489
03490 /* Nonzero means lvalues are limited to those valid in pedantic ANSI C.
03491 Zero means allow extended lvalues. */
03492
03493 extern int pedantic_lvalues;
03494
03495 /* Points to the FUNCTION_DECL of the function whose body we are reading. */
03496
03497 extern GTY(()) tree current_function_decl;
03498
03499 /* Nonzero means a FUNC_BEGIN label was emitted. */
03500 extern GTY(()) const char * current_function_func_begin_label;
03501
03502 /* In tree.c */
03503 extern unsigned crc32_string (unsigned, const char *);
03504 extern void clean_symbol_name (char *);
03505 extern tree get_file_function_name_long (const char *);
03506 extern tree get_set_constructor_bits (tree, char *, int);
03507 extern tree get_set_constructor_bytes (tree, unsigned char *, int);
03508 extern tree get_callee_fndecl (tree);
03509 extern void change_decl_assembler_name (tree, tree);
03510 extern int type_num_arguments (tree);
03511 extern bool associative_tree_code (enum tree_code);
03512 extern bool commutative_tree_code (enum tree_code);
03513 extern tree upper_bound_in_type (tree, tree);
03514 extern tree lower_bound_in_type (tree, tree);
03515 extern int operand_equal_for_phi_arg_p (tree, tree);
03516
03517 /* In stmt.c */
03518
03519 extern void expand_expr_stmt (tree);
03520 extern int warn_if_unused_value (tree, location_t);
03521 extern void expand_label (tree);
03522 extern void expand_goto (tree);
03523
03524 extern rtx expand_stack_save (void);
03525 extern void expand_stack_restore (tree);
03526 extern void expand_return (tree);
03527 extern int is_body_block (tree);
03528
03529 /* In tree-eh.c */
03530 extern void using_eh_for_cleanups (void);
03531
03532 /* In fold-const.c */
03533
03534 /* Fold constants as much as possible in an expression.
03535 Returns the simplified expression.
03536 Acts only on the top level of the expression;
03537 if the argument itself cannot be simplified, its
03538 subexpressions are not changed. */
03539
03540 extern tree fold (tree);
03541 extern tree fold_initializer (tree);
03542 extern tree fold_convert (tree, tree);
03543 extern tree fold_single_bit_test (enum tree_code, tree, tree, tree);
03544 extern tree fold_ignored_result (tree);
03545 extern tree fold_abs_const (tree, tree);
03546
03547 extern tree force_fit_type (tree, int, bool, bool);
03548
03549 extern int add_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03550 unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03551 unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
03552 extern int neg_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03553 unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
03554 extern int mul_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03555 unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03556 unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
03557 extern void lshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03558 HOST_WIDE_INT, unsigned int,
03559 unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, int);
03560 extern void rshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03561 HOST_WIDE_INT, unsigned int,
03562 unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, int);
03563 extern void lrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03564 HOST_WIDE_INT, unsigned int,
03565 unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
03566 extern void rrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
03567 HOST_WIDE_INT, unsigned int,
03568 unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
03569
03570 extern int div_and_round_double (enum tree_code, int, unsigned HOST_WIDE_INT,
03571 HOST_WIDE_INT, unsigned HOST_WIDE_INT,
03572 HOST_WIDE_INT, unsigned HOST_WIDE_INT *,
03573 HOST_WIDE_INT *, unsigned HOST_WIDE_INT *,
03574 HOST_WIDE_INT *);
03575
03576 enum operand_equal_flag
03577 {
03578 OEP_ONLY_CONST = 1,
03579 OEP_PURE_SAME = 2
03580 };
03581
03582 extern int operand_equal_p (tree, tree, unsigned int);
03583
03584 extern tree omit_one_operand (tree, tree, tree);
03585 extern tree omit_two_operands (tree, tree, tree, tree);
03586 extern tree invert_truthvalue (tree);
03587 extern tree fold_unary_to_constant (enum tree_code, tree, tree);
03588 extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree);
03589 extern tree fold_read_from_constant_string (tree);
03590 extern tree int_const_binop (enum tree_code, tree, tree, int);
03591 extern tree build_fold_addr_expr (tree);
03592 extern tree fold_build_cleanup_point_expr (tree type, tree expr);
03593 extern tree fold_strip_sign_ops (tree);
03594 extern tree build_fold_addr_expr_with_type (tree, tree);
03595 extern tree build_fold_indirect_ref (tree);
03596 extern tree fold_indirect_ref (tree);
03597 extern tree constant_boolean_node (int, tree);
03598 extern tree build_low_bits_mask (tree, unsigned);
03599 extern tree fold_complex_mult_parts (tree, tree, tree, tree, tree);
03600 extern tree fold_complex_div_parts (tree, tree, tree, tree, tree,
03601 enum tree_code);
03602
03603 extern bool tree_swap_operands_p (tree, tree, bool);
03604 extern enum tree_code swap_tree_comparison (enum tree_code);
03605
03606 extern bool ptr_difference_const (tree, tree, HOST_WIDE_INT *);
03607
03608 /* In builtins.c */
03609 extern tree fold_builtin (tree, bool);
03610 extern tree fold_builtin_fputs (tree, bool, bool, tree);
03611 extern tree fold_builtin_strcpy (tree, tree);
03612 extern tree fold_builtin_strncpy (tree, tree);
03613 extern bool fold_builtin_next_arg (tree);
03614 extern enum built_in_function builtin_mathfn_code (tree);
03615 extern tree build_function_call_expr (tree, tree);
03616 extern tree mathfn_built_in (tree, enum built_in_function fn);
03617 extern tree strip_float_extensions (tree);
03618 extern tree c_strlen (tree, int);
03619 extern tree std_gimplify_va_arg_expr (tree, tree, tree *, tree *);
03620 extern tree build_va_arg_indirect_ref (tree);
03621
03622 /* In convert.c */
03623 extern tree strip_float_extensions (tree);
03624
03625 /* In alias.c */
03626 extern void record_component_aliases (tree);
03627 extern HOST_WIDE_INT get_alias_set (tree);
03628 extern int alias_sets_conflict_p (HOST_WIDE_INT, HOST_WIDE_INT);
03629 extern int alias_sets_might_conflict_p (HOST_WIDE_INT, HOST_WIDE_INT);
03630 extern int objects_must_conflict_p (tree, tree);
03631
03632 /* In tree.c */
03633 extern int really_constant_p (tree);
03634 extern int int_fits_type_p (tree, tree);
03635 extern bool variably_modified_type_p (tree, tree);
03636 extern int tree_log2 (tree);
03637 extern int tree_floor_log2 (tree);
03638 extern int simple_cst_equal (tree, tree);
03639 extern unsigned int iterative_hash_expr (tree, unsigned int);
03640 extern int compare_tree_int (tree, unsigned HOST_WIDE_INT);
03641 extern int type_list_equal (tree, tree);
03642 extern int chain_member (tree, tree);
03643 extern tree type_hash_lookup (unsigned int, tree);
03644 extern void type_hash_add (unsigned int, tree);
03645 extern int simple_cst_list_equal (tree, tree);
03646 extern void dump_tree_statistics (void);
03647 extern void expand_function_end (void);
03648 extern void expand_function_start (tree);
03649 extern void recompute_tree_invarant_for_addr_expr (tree);
03650 extern bool is_global_var (tree t);
03651 extern bool needs_to_live_in_memory (tree);
03652 extern tree reconstruct_complex_type (tree, tree);
03653
03654 extern int real_onep (tree);
03655 extern int real_twop (tree);
03656 extern int real_minus_onep (tree);
03657 extern void init_ttree (void);
03658 extern void build_common_tree_nodes (bool, bool);
03659 extern void build_common_tree_nodes_2 (int);
03660 extern void build_common_builtin_nodes (void);
03661 extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int);
03662 extern tree build_range_type (tree, tree, tree);
03663 extern HOST_WIDE_INT int_cst_value (tree);
03664 extern tree tree_fold_gcd (tree, tree);
03665 extern tree build_addr (tree);
03666
03667 extern bool fields_compatible_p (tree, tree);
03668 extern tree find_compatible_field (tree, tree);
03669
03670 /* In function.c */
03671 extern void expand_main_function (void);
03672 extern void init_dummy_function_start (void);
03673 extern void expand_dummy_function_end (void);
03674 extern void init_function_for_compilation (void);
03675 extern void allocate_struct_function (tree);
03676 extern void init_function_start (tree);
03677 extern bool use_register_for_decl (tree);
03678 extern void setjmp_vars_warning (tree);
03679 extern void setjmp_args_warning (void);
03680 extern void init_temp_slots (void);
03681 extern void free_temp_slots (void);
03682 extern void pop_temp_slots (void);
03683 extern void push_temp_slots (void);
03684 extern void preserve_temp_slots (rtx);
03685 extern int aggregate_value_p (tree, tree);
03686 extern void push_function_context (void);
03687 extern void pop_function_context (void);
03688 extern void push_function_context_to (tree);
03689 extern void pop_function_context_from (tree);
03690 extern tree gimplify_parameters (void);
03691
03692 /* In print-rtl.c */
03693 #ifdef BUFSIZ
03694 extern void print_rtl (FILE *, rtx);
03695 #endif
03696
03697 /* In print-tree.c */
03698 extern void debug_tree (tree);
03699 #ifdef BUFSIZ
03700 extern void print_node (FILE *, const char *, tree, int);
03701 extern void print_node_brief (FILE *, const char *, tree, int);
03702 extern void indent_to (FILE *, int);
03703 #endif
03704
03705 /* In tree-inline.c: */
03706 extern bool debug_find_tree (tree, tree);
03707 /* This is in tree-inline.c since the routine uses
03708 data structures from the inliner. */
03709 extern tree unsave_expr_now (tree);
03710
03711 /* In emit-rtl.c */
03712 extern rtx emit_line_note (location_t);
03713
03714 /* In calls.c */
03715
03716 /* Nonzero if this is a call to a function whose return value depends
03717 solely on its arguments, has no side effects, and does not read
03718 global memory. */
03719 #define ECF_CONST 1
03720 /* Nonzero if this call will never return. */
03721 #define ECF_NORETURN 2
03722 /* Nonzero if this is a call to malloc or a related function. */
03723 #define ECF_MALLOC 4
03724 /* Nonzero if it is plausible that this is a call to alloca. */
03725 #define ECF_MAY_BE_ALLOCA 8
03726 /* Nonzero if this is a call to a function that won't throw an exception. */
03727 #define ECF_NOTHROW 16
03728 /* Nonzero if this is a call to setjmp or a related function. */
03729 #define ECF_RETURNS_TWICE 32
03730 /* Nonzero if this call replaces the current stack frame. */
03731 #define ECF_SIBCALL 64
03732 /* Nonzero if this is a call to "pure" function (like const function,
03733 but may read memory. */
03734 #define ECF_PURE 128
03735 /* Nonzero if this is a call to a function that returns with the stack
03736 pointer depressed. */
03737 #define ECF_SP_DEPRESSED 256
03738 /* Nonzero if this call is known to always return. */
03739 #define ECF_ALWAYS_RETURN 512
03740 /* Create libcall block around the call. */
03741 #define ECF_LIBCALL_BLOCK 1024
03742
03743 extern int flags_from_decl_or_type (tree);
03744 extern int call_expr_flags (tree);
03745
03746 extern int setjmp_call_p (tree);
03747 extern bool alloca_call_p (tree);
03748 extern bool must_pass_in_stack_var_size (enum machine_mode, tree);
03749 extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, tree);
03750
03751 /* In attribs.c. */
03752
03753 /* Process the attributes listed in ATTRIBUTES and install them in *NODE,
03754 which is either a DECL (including a TYPE_DECL) or a TYPE. If a DECL,
03755 it should be modified in place; if a TYPE, a copy should be created
03756 unless ATTR_FLAG_TYPE_IN_PLACE is set in FLAGS. FLAGS gives further
03757 information, in the form of a bitwise OR of flags in enum attribute_flags
03758 from tree.h. Depending on these flags, some attributes may be
03759 returned to be applied at a later stage (for example, to apply
03760 a decl attribute to the declaration rather than to its type). */
03761 extern tree decl_attributes (tree *, tree, int);
03762
03763 /* In integrate.c */
03764 extern void set_decl_abstract_flags (tree, int);
03765 extern void set_decl_origin_self (tree);
03766
03767 /* In stor-layout.c */
03768 extern void set_min_and_max_values_for_integral_type (tree, int, bool);
03769 extern void fixup_signed_type (tree);
03770 extern void internal_reference_types (void);
03771 extern unsigned int update_alignment_for_field (record_layout_info, tree,
03772 unsigned int);
03773 /* varasm.c */
03774 extern void make_decl_rtl (tree);
03775 extern void make_decl_one_only (tree);
03776 extern int supports_one_only (void);
03777 extern void variable_section (tree, int);
03778 extern void resolve_unique_section (tree, int, int);
03779 extern void mark_referenced (tree);
03780 extern void mark_decl_referenced (tree);
03781 extern void notice_global_symbol (tree);
03782 extern void set_user_assembler_name (tree, const char *);
03783 extern void process_pending_assemble_externals (void);
03784 extern void finish_aliases_1 (void);
03785 extern void finish_aliases_2 (void);
03786
03787 /* In stmt.c */
03788 extern void expand_computed_goto (tree);
03789 extern bool parse_output_constraint (const char **, int, int, int,
03790 bool *, bool *, bool *);
03791 extern bool parse_input_constraint (const char **, int, int, int, int,
03792 const char * const *, bool *, bool *);
03793 extern void expand_asm_expr (tree);
03794 extern tree resolve_asm_operand_names (tree, tree, tree);
03795 extern void expand_case (tree);
03796 extern void expand_decl (tree);
03797 extern void expand_anon_union_decl (tree, tree, tree);
03798
03799 /* In gimplify.c. */
03800 extern tree create_artificial_label (void);
03801 extern void gimplify_function_tree (tree);
03802 extern const char *get_name (tree);
03803 extern tree unshare_expr (tree);
03804 extern void sort_case_labels (tree);
03805
03806 /* If KIND=='I', return a suitable global initializer (constructor) name.
03807 If KIND=='D', return a suitable global clean-up (destructor) name. */
03808 extern tree get_file_function_name (int);
03809
03810 /* Interface of the DWARF2 unwind info support. */
03811
03812 /* Generate a new label for the CFI info to refer to. */
03813
03814 extern char *dwarf2out_cfi_label (void);
03815
03816 /* Entry point to update the canonical frame address (CFA). */
03817
03818 extern void dwarf2out_def_cfa (const char *, unsigned, HOST_WIDE_INT);
03819
03820 /* Add the CFI for saving a register window. */
03821
03822 extern void dwarf2out_window_save (const char *);
03823
03824 /* Add a CFI to update the running total of the size of arguments pushed
03825 onto the stack. */
03826
03827 extern void dwarf2out_args_size (const char *, HOST_WIDE_INT);
03828
03829 /* Entry point for saving a register to the stack. */
03830
03831 extern void dwarf2out_reg_save (const char *, unsigned, HOST_WIDE_INT);
03832
03833 /* Entry point for saving the return address in the stack. */
03834
03835 extern void dwarf2out_return_save (const char *, HOST_WIDE_INT);
03836
03837 /* Entry point for saving the return address in a register. */
03838
03839 extern void dwarf2out_return_reg (const char *, unsigned);
03840
03841 /* In tree-inline.c */
03842
03843 /* The type of a set of already-visited pointers. Functions for creating
03844 and manipulating it are declared in pointer-set.h */
03845 struct pointer_set_t;
03846
03847 /* The type of a callback function for walking over tree structure. */
03848
03849 typedef tree (*walk_tree_fn) (tree *, int *, void *);
03850 extern tree walk_tree (tree*, walk_tree_fn, void*, struct pointer_set_t*);
03851 extern tree walk_tree_without_duplicates (tree*, walk_tree_fn, void*);
03852
03853 /* In tree-dump.c */
03854
03855 /* Different tree dump places. When you add new tree dump places,
03856 extend the DUMP_FILES array in tree-dump.c. */
03857 enum tree_dump_index
03858 {
03859 TDI_none, /* No dump */
03860 TDI_tu, /* dump the whole translation unit. */
03861 TDI_class, /* dump class hierarchy. */
03862 TDI_original, /* dump each function before optimizing it */
03863 TDI_generic, /* dump each function after genericizing it */
03864 TDI_nested, /* dump each function after unnesting it */
03865 TDI_inlined, /* dump each function after inlining
03866 within it. */
03867 TDI_vcg, /* create a VCG graph file for each
03868 function's flowgraph. */
03869 TDI_tree_all, /* enable all the GENERIC/GIMPLE dumps. */
03870 TDI_rtl_all, /* enable all the RTL dumps. */
03871 TDI_ipa_all, /* enable all the IPA dumps. */
03872
03873 TDI_cgraph, /* dump function call graph. */
03874
03875 DFI_MIN, /* For now, RTL dumps are placed here. */
03876 DFI_sibling = DFI_MIN,
03877 DFI_eh,
03878 DFI_jump,
03879 DFI_cse,
03880 DFI_gcse,
03881 DFI_loop,
03882 DFI_bypass,
03883 DFI_cfg,
03884 DFI_bp,
03885 DFI_vpt,
03886 DFI_ce1,
03887 DFI_tracer,
03888 DFI_loop2,
03889 DFI_web,
03890 DFI_cse2,
03891 DFI_life,
03892 DFI_combine,
03893 DFI_ce2,
03894 DFI_regmove,
03895 DFI_sms,
03896 DFI_sched,
03897 DFI_lreg,
03898 DFI_greg,
03899 DFI_postreload,
03900 DFI_gcse2,
03901 DFI_flow2,
03902 DFI_peephole2,
03903 DFI_ce3,
03904 DFI_rnreg,
03905 DFI_bbro,
03906 DFI_branch_target_load,
03907 DFI_sched2,
03908 DFI_stack,
03909 DFI_vartrack,
03910 DFI_mach,
03911 DFI_dbr,
03912
03913 TDI_end
03914 };
03915
03916 /* Bit masks to control dumping. Not all values are applicable to
03917 all dumps. Add new ones at the end. When you define new
03918 values, extend the DUMP_OPTIONS array in tree-dump.c */
03919 #define TDF_ADDRESS (1 << 0) /* dump node addresses */
03920 #define TDF_SLIM (1 << 1) /* don't go wild following links */
03921 #define TDF_RAW (1 << 2) /* don't unparse the function */
03922 #define TDF_DETAILS (1 << 3) /* show more detailed info about
03923 each pass */
03924 #define TDF_STATS (1 << 4) /* dump various statistics about
03925 each pass */
03926 #define TDF_BLOCKS (1 << 5) /* display basic block boundaries */
03927 #define TDF_VOPS (1 << 6) /* display virtual operands */
03928 #define TDF_LINENO (1 << 7) /* display statement line numbers */
03929 #define TDF_UID (1 << 8) /* display decl UIDs */
03930
03931 #define TDF_TREE (1 << 9) /* is a tree dump */
03932 #define TDF_RTL (1 << 10) /* is a RTL dump */
03933 #define TDF_IPA (1 << 11) /* is an IPA dump */
03934
03935 #define TDF_GRAPH (1 << 12) /* a graph dump is being emitted */
03936
03937 typedef struct dump_info *dump_info_p;
03938
03939 extern char *get_dump_file_name (enum tree_dump_index);
03940 extern int dump_flag (dump_info_p, int, tree);
03941 extern int dump_enabled_p (enum tree_dump_index);
03942 extern int dump_initialized_p (enum tree_dump_index);
03943 extern FILE *dump_begin (enum tree_dump_index, int *);
03944 extern void dump_end (enum tree_dump_index, FILE *);
03945 extern void dump_node (tree, int, FILE *);
03946 extern int dump_switch_p (const char *);
03947 extern const char *dump_flag_name (enum tree_dump_index);
03948 /* Assign the RTX to declaration. */
03949
03950 extern void set_decl_rtl (tree, rtx);
03951 extern void set_decl_incoming_rtl (tree, rtx);
03952
03953 /* Enum and arrays used for tree allocation stats.
03954 Keep in sync with tree.c:tree_node_kind_names. */
03955 typedef enum
03956 {
03957 d_kind,
03958 t_kind,
03959 b_kind,
03960 s_kind,
03961 r_kind,
03962 e_kind,
03963 c_kind,
03964 id_kind,
03965 perm_list_kind,
03966 temp_list_kind,
03967 vec_kind,
03968 binfo_kind,
03969 phi_kind,
03970 ssa_name_kind,
03971 x_kind,
03972 lang_decl,
03973 lang_type,
03974 all_kinds
03975 } tree_node_kind;
03976
03977 extern int tree_node_counts[];
03978 extern int tree_node_sizes[];
03979
03980 /* True if we are in gimple form and the actions of the folders need to
03981 be restricted. False if we are not in gimple form and folding is not
03982 restricted to creating gimple expressions. */
03983 extern bool in_gimple_form;
03984
03985 /* In tree-ssa-threadupdate.c. */
03986 extern bool thread_through_all_blocks (void);
03987
03988 /* In tree-gimple.c. */
03989 extern tree get_base_address (tree t);
03990
03991 /* In tree-vectorizer.c. */
03992 extern void vect_set_verbosity_level (const char *);
03993
03994 #ifdef KEY
03995 /* Bug 1392 */
03996 #include "gspin-gcc-interface.h"
03997 /* gspin global variables */
03998 extern int flag_spin_file;
03999 /* gspin function declarations */
04000 extern void gspin (tree t);
04001 extern gs_t gs_x (tree node);
04002 extern gs_t gs_x_func_decl (tree node);
04003 extern void gspin_gxx_emits_decl (tree t);
04004 extern void gspin_gxx_emits_thunk_decl (tree t);
04005 extern void gspin_gxx_emits_asm (char *str);
04006 extern void gspin_init_global_trees_list (void);
04007 extern int gspin_invoked (tree t);
04008 extern void gs_set_flag_value (tree t, unsigned int flag, bool value);
04009 extern void gs_set_program_flag_value (unsigned int flag, bool value);
04010 #endif
04011
04012 #endif /* GCC_TREE_H */