#include "vec.h"
#include "vecir.h"
#include "double-int.h"
+#include "real.h"
+#include "fixed-value.h"
#include "alias.h"
#include "options.h"
ATTRIBUTE_NORETURN;
extern void tree_range_check_failed (const_tree, const char *, int,
const char *, enum tree_code,
- enum tree_code);
+ enum tree_code)
+ ATTRIBUTE_NORETURN;
extern void tree_not_class_check_failed (const_tree,
const enum tree_code_class,
const char *, int, const char *)
#define SSA_NAME_PTR_INFO(N) \
SSA_NAME_CHECK (N)->ssa_name.ptr_info
-#ifndef _TREE_FLOW_H
+/* Defined in tree-flow.h. */
struct ptr_info_def;
-#endif
-
-
/* Immediate use linking structure. This structure is used for maintaining
a doubly linked list of uses of an SSA_NAME. */
#define SET_TYPE_MODE(NODE, MODE) \
(TYPE_CHECK (NODE)->type.mode = (MODE))
-/* The "canonical" type for this type node, which can be used to
- compare the type for equality with another type. If two types are
+/* The "canonical" type for this type node, which is used by frontends to
+ compare the type for equality with another type. If two types are
equal (based on the semantics of the language), then they will have
equivalent TYPE_CANONICAL entries.
- As a special case, if TYPE_CANONICAL is NULL_TREE, then it cannot
- be used for comparison against other types. Instead, the type is
+ As a special case, if TYPE_CANONICAL is NULL_TREE, and thus
+ TYPE_STRUCTURAL_EQUALITY_P is true, then it cannot
+ be used for comparison against other types. Instead, the type is
said to require structural equality checks, described in
- TYPE_STRUCTURAL_EQUALITY_P. */
+ TYPE_STRUCTURAL_EQUALITY_P.
+
+ For unqualified aggregate and function types the middle-end relies on
+ TYPE_CANONICAL to tell whether two variables can be assigned
+ to each other without a conversion. The middle-end also makes sure
+ to assign the same alias-sets to the type partition with equal
+ TYPE_CANONICAL of their unqualified variants. */
#define TYPE_CANONICAL(NODE) (TYPE_CHECK (NODE)->type.canonical)
/* Indicates that the type node requires structural equality
- checks. The compiler will need to look at the composition of the
+ checks. The compiler will need to look at the composition of the
type to determine whether it is equal to another type, rather than
- just comparing canonical type pointers. For instance, we would need
+ just comparing canonical type pointers. For instance, we would need
to look at the return and parameter types of a FUNCTION_TYPE
- node. */
+ node. */
#define TYPE_STRUCTURAL_EQUALITY_P(NODE) (TYPE_CANONICAL (NODE) == NULL_TREE)
/* Sets the TYPE_CANONICAL field to NULL_TREE, indicating that the
- type node requires structural equality. */
+ type node requires structural equality. */
#define SET_TYPE_STRUCTURAL_EQUALITY(NODE) (TYPE_CANONICAL (NODE) = NULL_TREE)
+
#define TYPE_LANG_SPECIFIC(NODE) (TYPE_CHECK (NODE)->type.lang_specific)
#define TYPE_IBIT(NODE) (GET_MODE_IBIT (TYPE_MODE (NODE)))
#define TYPE_FBIT(NODE) (GET_MODE_FBIT (TYPE_MODE (NODE)))
for various types of node. */
union GTY ((ptr_alias (union lang_tree_node),
- desc ("tree_node_structure (&%h)"))) tree_node {
+ desc ("tree_node_structure (&%h)"), variable_size)) tree_node {
struct tree_base GTY ((tag ("TS_BASE"))) base;
struct tree_common GTY ((tag ("TS_COMMON"))) common;
struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst;
itk_unsigned_long,
itk_long_long,
itk_unsigned_long_long,
+ itk_int128,
+ itk_unsigned_int128,
itk_none
};
#define long_unsigned_type_node integer_types[itk_unsigned_long]
#define long_long_integer_type_node integer_types[itk_long_long]
#define long_long_unsigned_type_node integer_types[itk_unsigned_long_long]
+#define int128_integer_type_node integer_types[itk_int128]
+#define int128_unsigned_type_node integer_types[itk_unsigned_int128]
\f
/* Set to the default thread-local storage (tls) model to use. */
/* Construct various types of nodes. */
extern tree build_nt (enum tree_code, ...);
-extern tree build_nt_call_list (tree, tree);
extern tree build_nt_call_vec (tree, VEC(tree,gc) *);
extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL);
extern tree double_int_to_tree (tree, double_int);
extern bool double_int_fits_to_tree_p (const_tree, double_int);
+extern tree force_fit_type_double (tree, double_int, int, bool);
/* Create an INT_CST node with a CST value zero extended. */
extern tree build_int_cst (tree, HOST_WIDE_INT);
extern tree build_int_cst_type (tree, HOST_WIDE_INT);
extern tree build_int_cst_wide (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT);
-extern tree build_int_cst_wide_type (tree,
- unsigned HOST_WIDE_INT, HOST_WIDE_INT);
extern tree build_vector (tree, tree);
extern tree build_vector_from_ctor (tree, VEC(constructor_elt,gc) *);
extern tree build_constructor (tree, VEC(constructor_elt,gc) *);
extern tree value_member (tree, tree);
extern tree purpose_member (const_tree, tree);
+extern bool vec_member (const_tree, VEC(tree,gc) *);
extern tree chain_index (int, tree);
extern int attribute_list_equal (const_tree, const_tree);
tree prev_field;
/* The static variables (i.e., class variables, as opposed to
instance variables) encountered in T. */
- tree pending_statics;
+ VEC(tree,gc) *pending_statics;
/* Bits remaining in the current alignment group */
int remaining_in_alignment;
/* True if we've seen a packed field that didn't have normal
extern int type_num_arguments (const_tree);
extern bool associative_tree_code (enum tree_code);
extern bool commutative_tree_code (enum tree_code);
+extern bool commutative_ternary_tree_code (enum tree_code);
extern tree upper_bound_in_type (tree, tree);
extern tree lower_bound_in_type (tree, tree);
extern int operand_equal_for_phi_arg_p (const_tree, const_tree);
extern const char *get_name (tree);
extern bool stdarg_p (tree);
extern bool prototype_p (tree);
+extern bool is_typedef_decl (tree x);
+extern bool typedef_variant_p (tree);
extern bool auto_var_in_fn_p (const_tree, const_tree);
extern tree build_low_bits_mask (tree, unsigned);
extern tree tree_strip_nop_conversions (tree);
#define fold_indirect_ref(T)\
fold_indirect_ref_loc (UNKNOWN_LOCATION, T)
extern tree fold_indirect_ref_loc (location_t, tree);
+extern tree build_simple_mem_ref_loc (location_t, tree);
+#define build_simple_mem_ref(T)\
+ build_simple_mem_ref_loc (UNKNOWN_LOCATION, T)
+extern double_int mem_ref_offset (const_tree);
extern tree constant_boolean_node (int, tree);
extern tree div_if_zero_remainder (enum tree_code, const_tree, const_tree);
extern enum built_in_function builtin_mathfn_code (const_tree);
extern tree build_function_call_expr (location_t, tree, tree);
extern tree fold_builtin_call_array (location_t, tree, tree, int, tree *);
-#define build_call_expr(...)\
- build_call_expr_loc (UNKNOWN_LOCATION, __VA_ARGS__)
extern tree build_call_expr_loc (location_t, tree, int, ...);
+extern tree build_call_expr (tree, int, ...);
extern tree mathfn_built_in (tree, enum built_in_function fn);
extern tree c_strlen (tree, int);
extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
/* In print-tree.c */
extern void debug_tree (tree);
+extern void debug_vec_tree (VEC(tree,gc) *);
#ifdef BUFSIZ
extern void dump_addr (FILE*, const char *, const void *);
extern void print_node (FILE *, const char *, tree, int);
+extern void print_vec_tree (FILE *, const char *, VEC(tree,gc) *, int);
extern void print_node_brief (FILE *, const char *, const_tree, int);
extern void indent_to (FILE *, int);
#endif
extern unsigned int tree_map_hash (const void *);
#define tree_map_marked_p tree_map_base_marked_p
+/* Map from a decl tree to another tree. */
+
+struct GTY(()) tree_decl_map {
+ struct tree_map_base base;
+ tree to;
+};
+
+#define tree_decl_map_eq tree_map_base_eq
+extern unsigned int tree_decl_map_hash (const void *);
+#define tree_decl_map_marked_p tree_map_base_marked_p
+
/* Map from a tree to an int. */
struct GTY(()) tree_int_map {
return TREE_CODE (t) == LANG_TYPE || TREE_CODE (t) >= NUM_TREE_CODES;
}
+/* In gimple-low.c. */
+extern bool block_may_fallthru (const_tree);
+
#endif /* GCC_TREE_H */