/* Front-end tree definitions for GNU compiler.
Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
In CONSTRUCTOR nodes, it means object constructed must be in memory.
In LABEL_DECL nodes, it means a goto for this label has been seen
from a place outside all binding contours that restore stack levels.
- In ..._TYPE nodes, it means that objects of this type must
- be fully addressable. This means that pieces of this
- object cannot go into register parameters, for example.
+ In ..._TYPE nodes, it means that objects of this type must be fully
+ addressable. This means that pieces of this object cannot go into
+ register parameters, for example. If this a function type, this
+ means that the value must be returned in memory.
In IDENTIFIER_NODEs, this means that some extern decl for this name
had its address taken. That matters for inline functions. */
#define TREE_ADDRESSABLE(NODE) ((NODE)->base.addressable_flag)
(TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \
RESULT_DECL)->decl_common.decl_restricted_flag)
+#define DECL_READ_P(NODE) \
+ (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_read_flag)
+
/* In a CALL_EXPR, means that the call is the jump from a thunk to the
thunked-to function. */
#define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag)
#define FOR_EACH_CONSTRUCTOR_ELT(V, IX, INDEX, VAL) \
for (IX = 0; (IX >= VEC_length (constructor_elt, V)) \
? false \
- : ((VAL = VEC_index (constructor_elt, V, IX)->value), \
+ : (((void) (VAL = VEC_index (constructor_elt, V, IX)->value)), \
(INDEX = VEC_index (constructor_elt, V, IX)->index), \
- true); \
+ true); \
(IX)++)
/* Append a new constructor element to V, with the specified INDEX and VAL. */
#define TYPE_NEEDS_CONSTRUCTING(NODE) \
(TYPE_CHECK (NODE)->type.needs_constructing_flag)
-/* Indicates that objects of this type (a UNION_TYPE), should be passed
- the same way that the first union alternative would be passed. */
-#define TYPE_TRANSPARENT_UNION(NODE) \
- (UNION_TYPE_CHECK (NODE)->type.transparent_union_flag)
+/* Indicates that a UNION_TYPE object should be passed the same way that
+ the first union alternative would be passed, or that a RECORD_TYPE
+ object should be passed the same way that the first (and only) member
+ would be passed. */
+#define TYPE_TRANSPARENT_AGGR(NODE) \
+ (RECORD_OR_UNION_CHECK (NODE)->type.transparent_aggr_flag)
/* For an ARRAY_TYPE, indicates that it is not permitted to take the
address of a component of the type. This is the counterpart of
DECL_NONADDRESSABLE_P for arrays, see the definition of this flag. */
#define TYPE_NONALIASED_COMPONENT(NODE) \
- (ARRAY_TYPE_CHECK (NODE)->type.transparent_union_flag)
+ (ARRAY_TYPE_CHECK (NODE)->type.transparent_aggr_flag)
/* Indicated that objects of this type should be laid out in as
compact a way as possible. */
unsigned int precision : 10;
unsigned no_force_blk_flag : 1;
unsigned needs_constructing_flag : 1;
- unsigned transparent_union_flag : 1;
+ unsigned transparent_aggr_flag : 1;
unsigned restrict_flag : 1;
unsigned contains_placeholder_bits : 2;
uses. */
#define DEBUG_TEMP_UID(NODE) (-DECL_UID (TREE_CHECK ((NODE), DEBUG_EXPR_DECL)))
+/* Every ..._DECL node gets a unique number that stays the same even
+ when the decl is copied by the inliner once it is set. */
+#define DECL_PT_UID(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid == -1u ? (NODE)->decl_minimal.uid : (NODE)->decl_common.pt_uid)
+/* Initialize the ..._DECL node pt-uid to the decls uid. */
+#define SET_DECL_PT_UID(NODE, UID) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid = (UID))
+/* Whether the ..._DECL node pt-uid has been initialized and thus needs to
+ be preserved when copyin the decl. */
+#define DECL_PT_UID_SET_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid != -1u)
+
/* These two fields describe where in the source code the declaration
was. If the declaration appears in several places (as for a C
function that is declared first and then defined later), this
|| TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
/* Nonzero for a decl that is decorated using attribute used.
- This indicates compiler tools that this decl needs to be preserved. */
+ This indicates to compiler tools that this decl needs to be preserved. */
#define DECL_PRESERVE_P(DECL) \
DECL_COMMON_CHECK (DECL)->decl_common.preserve_flag
/* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_RESTRICTED_P. */
unsigned decl_restricted_flag : 1;
+ /* In VAR_DECL and PARM_DECL set when the decl has been used except for
+ being set. */
+ unsigned decl_read_flag : 1;
+
/* Padding so that 'off_align' can be on a 32-bit boundary. */
- unsigned decl_common_unused : 2;
+ unsigned decl_common_unused : 1;
/* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */
unsigned int off_align : 8;
/* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */
unsigned int align;
+ /* UID for points-to sets, stable over copying from inlining. */
+ unsigned int pt_uid;
+
tree size_unit;
tree initial;
tree attributes;
extern int fields_length (const_tree);
+/* Returns the first FIELD_DECL in a type. */
+
+extern tree first_field (const_tree);
+
/* Given an initializer INIT, return TRUE if INIT is zero or some
aggregate of zeros. Otherwise return FALSE. */
extern tree tree_strip_nop_conversions (tree);
extern tree tree_strip_sign_nop_conversions (tree);
extern tree lhd_gcc_personality (void);
+extern void assign_assembler_name_if_neeeded (tree);
+
\f
/* In cgraph.c */
extern void change_decl_assembler_name (tree, tree);
extern void fold_undefer_and_ignore_overflow_warnings (void);
extern bool fold_deferring_overflow_warnings_p (void);
-extern tree force_fit_type_double (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- int, bool);
-
-extern int fit_double_type (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, const_tree);
-extern int add_double_with_sign (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- unsigned HOST_WIDE_INT *, HOST_WIDE_INT *,
- bool);
-#define add_double(l1,h1,l2,h2,lv,hv) \
- add_double_with_sign (l1, h1, l2, h2, lv, hv, false)
-extern int neg_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
-extern int mul_double_with_sign (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- unsigned HOST_WIDE_INT *, HOST_WIDE_INT *,
- bool);
-#define mul_double(l1,h1,l2,h2,lv,hv) \
- mul_double_with_sign (l1, h1, l2, h2, lv, hv, false)
-extern void lshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- HOST_WIDE_INT, unsigned int,
- unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, int);
-extern void rshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- HOST_WIDE_INT, unsigned int,
- unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, int);
-extern void lrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- HOST_WIDE_INT, unsigned int,
- unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
-extern void rrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
- HOST_WIDE_INT, unsigned int,
- unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
-
-extern int div_and_round_double (enum tree_code, int, unsigned HOST_WIDE_INT,
- HOST_WIDE_INT, unsigned HOST_WIDE_INT,
- HOST_WIDE_INT, unsigned HOST_WIDE_INT *,
- HOST_WIDE_INT *, unsigned HOST_WIDE_INT *,
- HOST_WIDE_INT *);
-
enum operand_equal_flag
{
OEP_ONLY_CONST = 1,
unsigned int);
/* varasm.c */
extern void make_decl_rtl (tree);
+extern rtx make_decl_rtl_for_debug (tree);
extern void make_decl_one_only (tree, tree);
extern int supports_one_only (void);
extern void resolve_unique_section (tree, int, int);
tree target_for_debug_bind (tree);
-/* In tree-ssa-ccp.c */
-extern tree maybe_fold_offset_to_reference (location_t, tree, tree, tree);
-extern tree maybe_fold_offset_to_address (location_t, tree, tree, tree);
-extern tree maybe_fold_stmt_addition (location_t, tree, tree, tree);
-
/* In tree-ssa-address.c. */
extern tree tree_mem_ref_addr (tree, tree);
extern void copy_mem_ref_info (tree, tree);