|| TREE_CODE (NODE) == OMP_ORDERED \
|| TREE_CODE (NODE) == OMP_CRITICAL \
|| TREE_CODE (NODE) == OMP_RETURN \
+ || TREE_CODE (NODE) == OMP_ATOMIC_LOAD \
+ || TREE_CODE (NODE) == OMP_ATOMIC_STORE \
|| TREE_CODE (NODE) == OMP_CONTINUE)
/* Number of argument-words in each kind of tree-node. */
VAR_DECL or FUNCTION_DECL or IDENTIFIER_NODE
ASM_VOLATILE_P in
ASM_EXPR
+ CALL_EXPR_VA_ARG_PACK in
+ CALL_EXPR
TYPE_CACHED_VALUES_P in
..._TYPE
SAVE_EXPR_RESOLVED_P in
TREE_ASM_WRITTEN in
VAR_DECL, FUNCTION_DECL, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
- BLOCK, SSA_NAME
+ BLOCK, SSA_NAME, STRING_CST
used_flag:
&& (TYPE_MODE (TREE_TYPE (EXP)) \
== TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0)))) \
&& (TYPE_UNSIGNED (TREE_TYPE (EXP)) \
- == TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
+ == TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (EXP, 0)))) \
+ && (POINTER_TYPE_P (TREE_TYPE (EXP)) \
+ == POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
(EXP) = TREE_OPERAND (EXP, 0)
/* Like STRIP_NOPS, but don't alter the TREE_TYPE either. */
#define SAVE_EXPR_RESOLVED_P(NODE) \
(TREE_CHECK (NODE, SAVE_EXPR)->base.public_flag)
+/* Set on a CALL_EXPR if this stdarg call should be passed the argument
+ pack. */
+#define CALL_EXPR_VA_ARG_PACK(NODE) \
+ (CALL_EXPR_CHECK(NODE)->base.public_flag)
+
/* In any expression, decl, or constant, nonzero means it has side effects or
reevaluation of the whole expression could produce a different value.
This is set if any subexpression is a function call, a side effect or a
/* In integral and pointer types, means an unsigned type. */
#define TYPE_UNSIGNED(NODE) (TYPE_CHECK (NODE)->base.unsigned_flag)
-/* Nonzero in a VAR_DECL means assembler code has been written.
+/* Nonzero in a VAR_DECL or STRING_CST means assembler code has been written.
Nonzero in a FUNCTION_DECL means that the function has been compiled.
This is interesting in an inline function, since it might not need
to be compiled separately.
#define EXPR_HAS_LOCATION(NODE) expr_has_location ((NODE))
#define EXPR_LOCUS(NODE) expr_locus ((NODE))
#define SET_EXPR_LOCUS(NODE, FROM) set_expr_locus ((NODE), (FROM))
-#define EXPR_FILENAME(NODE) *(expr_filename ((NODE)))
-#define EXPR_LINENO(NODE) *(expr_lineno ((NODE)))
+#define EXPR_FILENAME(NODE) (expr_filename ((NODE)))
+#define EXPR_LINENO(NODE) (expr_lineno ((NODE)))
/* True if a tree is an expression or statement that can have a
location. */
unsigned abstract_flag : 1;
unsigned block_num : 30;
+ location_t locus;
+
tree vars;
tree subblocks;
tree supercontext;
tree abstract_origin;
tree fragment_origin;
tree fragment_chain;
- location_t locus;
};
\f
/* Define fields and accessors for nodes representing data types. */
bitmap GTY ((skip)) aliases;
- unsigned int is_global:1;
+ /* True if this tag has global scope. */
+ unsigned int is_global : 1;
+
+ /* True if this tag is the first field of an aggregate type that
+ can be used to find adjacent SFTs belonging to the same aggregate. */
+ unsigned int base_for_components : 1;
+
+ /* True if this tag should not be grouped into a memory partition. */
+ unsigned int unpartitionable : 1;
};
#define MTAG_GLOBAL(NODE) (TREE_MEMORY_TAG_CHECK (NODE)->mtag.is_global)
#define SFT_NONADDRESSABLE_P(NODE) \
(STRUCT_FIELD_TAG_CHECK (NODE)->sft.alias_set != -1)
#define SFT_ALIAS_SET(NODE) (STRUCT_FIELD_TAG_CHECK (NODE)->sft.alias_set)
+#define SFT_UNPARTITIONABLE_P(NODE) \
+ (STRUCT_FIELD_TAG_CHECK (NODE)->sft.common.unpartitionable)
+#define SFT_BASE_FOR_COMPONENTS_P(NODE) \
+ (STRUCT_FIELD_TAG_CHECK (NODE)->sft.common.base_for_components)
/* Memory Partition Tags (MPTs) group memory symbols under one
common name for the purposes of placing memory PHI nodes. */
(DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from)
/* Nonzero for a given ..._DECL node means that the name of this node should
- be ignored for symbolic debug purposes. Moreover, for a FUNCTION_DECL,
- the body of the function should also be ignored. */
+ be ignored for symbolic debug purposes. */
#define DECL_IGNORED_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.ignored_flag)
/* Nonzero for a given ..._DECL node means that this node represents an
#define DECL_HAS_INIT_PRIORITY_P(NODE) \
(VAR_DECL_CHECK (NODE)->decl_with_vis.init_priority_p)
-/* For a VAR_DECL or FUNCTION_DECL with DECL_HAS_INIT_PRIORITY_P set,
- the initialization priority of NODE. */
+/* For a VAR_DECL or FUNCTION_DECL the initialization priority of
+ NODE. */
#define DECL_INIT_PRIORITY(NODE) \
(decl_init_priority_lookup (NODE))
/* Set the initialization priority for NODE to VAL. */
#define SET_DECL_INIT_PRIORITY(NODE, VAL) \
(decl_init_priority_insert (NODE, VAL))
-/* For a FUNCTION_DECL with DECL_HAS_INIT_PRIORITY_P set, the
- finalization priority of NODE. */
+/* For a FUNCTION_DECL the finalization priority of NODE. */
#define DECL_FINI_PRIORITY(NODE) \
(decl_fini_priority_lookup (NODE))
/* Set the finalization priority for NODE to VAL. */
#define DECL_DECLARED_INLINE_P(NODE) \
(FUNCTION_DECL_CHECK (NODE)->function_decl.declared_inline_flag)
+/* Nonzero in a FUNCTION_DECL that should be always inlined by the inliner
+ disregarding size and cost heuristics. This is equivalent to using
+ the always_inline attribute without the required diagnostics if the
+ function cannot be inlined. */
+#define DECL_DISREGARD_INLINE_LIMITS(NODE) \
+ (FUNCTION_DECL_CHECK (NODE)->function_decl.disregard_inline_limits)
+
/* For FUNCTION_DECL, this holds a pointer to a structure ("struct function")
that describes the status of this function. */
#define DECL_STRUCT_FUNCTION(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.f)
{
struct tree_decl_non_common common;
+ struct function *f;
+
/* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
- DECL_FUNCTION_CODE. Otherwise unused. */
- enum built_in_function function_code;
+ DECL_FUNCTION_CODE. Otherwise unused.
+ ??? The bitfield needs to be able to hold all target function
+ codes as well. */
+ ENUM_BITFIELD(built_in_function) function_code : 11;
+ ENUM_BITFIELD(built_in_class) built_in_class : 2;
unsigned static_ctor_flag : 1;
unsigned static_dtor_flag : 1;
unsigned uninlinable : 1;
+
unsigned possibly_inlined : 1;
unsigned novops_flag : 1;
unsigned returns_twice_flag : 1;
unsigned malloc_flag : 1;
unsigned pure_flag : 1;
-
unsigned declared_inline_flag : 1;
unsigned regdecl_flag : 1;
unsigned inline_flag : 1;
+
unsigned no_instrument_function_entry_exit : 1;
unsigned no_limit_stack : 1;
- ENUM_BITFIELD(built_in_class) built_in_class : 2;
+ unsigned disregard_inline_limits : 1;
- struct function *f;
+ /* 5 bits left */
};
/* For a TYPE_DECL, holds the "original" type. (TREE_TYPE has the copy.) */
extern tree value_member (tree, tree);
extern tree purpose_member (const_tree, tree);
-extern int attribute_list_equal (tree, tree);
-extern int attribute_list_contained (tree, tree);
+extern int attribute_list_equal (const_tree, const_tree);
+extern int attribute_list_contained (const_tree, const_tree);
extern int tree_int_cst_equal (const_tree, const_tree);
extern int tree_int_cst_lt (const_tree, const_tree);
extern int tree_int_cst_compare (const_tree, const_tree);
int packed_maybe_necessary;
} *record_layout_info;
-extern void set_lang_adjust_rli (void (*) (record_layout_info));
extern record_layout_info start_record_layout (tree);
extern tree bit_from_pos (tree, tree);
extern tree byte_from_pos (tree, tree);
extern tree convert (tree, tree);
extern unsigned int expr_align (const_tree);
extern tree expr_first (tree);
-extern const_tree const_expr_first (const_tree);
extern tree expr_last (tree);
-extern const_tree const_expr_last (const_tree);
extern tree expr_only (tree);
-extern const_tree const_expr_only (const_tree);
extern tree size_in_bytes (const_tree);
extern HOST_WIDE_INT int_size_in_bytes (const_tree);
extern HOST_WIDE_INT max_int_size_in_bytes (const_tree);
/* Nonzero means a FUNC_BEGIN label was emitted. */
extern GTY(()) const char * current_function_func_begin_label;
\f
+/* Iterator for going through the function arguments. */
+typedef struct {
+ tree fntype; /* function type declaration */
+ tree next; /* TREE_LIST pointing to the next argument */
+} function_args_iterator;
+
+/* Initialize the iterator I with arguments from function FNDECL */
+
+static inline void
+function_args_iter_init (function_args_iterator *i, tree fntype)
+{
+ i->fntype = fntype;
+ i->next = TYPE_ARG_TYPES (fntype);
+}
+
+/* Return a pointer that holds the next argument if there are more arguments to
+ handle, otherwise return NULL. */
+
+static inline tree *
+function_args_iter_cond_ptr (function_args_iterator *i)
+{
+ return (i->next) ? &TREE_VALUE (i->next) : NULL;
+}
+
+/* Return the next argument if there are more arguments to handle, otherwise
+ return NULL. */
+
+static inline tree
+function_args_iter_cond (function_args_iterator *i)
+{
+ return (i->next) ? TREE_VALUE (i->next) : NULL_TREE;
+}
+
+/* Advance to the next argument. */
+static inline void
+function_args_iter_next (function_args_iterator *i)
+{
+ gcc_assert (i->next != NULL_TREE);
+ i->next = TREE_CHAIN (i->next);
+}
+
+/* Loop over all function arguments of FNTYPE. In each iteration, PTR is set
+ to point to the next tree element. ITER is an instance of
+ function_args_iterator used to iterate the arguments. */
+#define FOREACH_FUNCTION_ARGS_PTR(FNTYPE, PTR, ITER) \
+ for (function_args_iter_init (&(ITER), (FNTYPE)); \
+ (PTR = function_args_iter_cond_ptr (&(ITER))) != NULL; \
+ function_args_iter_next (&(ITER)))
+
+/* Loop over all function arguments of FNTYPE. In each iteration, TREE is set
+ to the next tree element. ITER is an instance of function_args_iterator
+ used to iterate the arguments. */
+#define FOREACH_FUNCTION_ARGS(FNTYPE, TREE, ITER) \
+ for (function_args_iter_init (&(ITER), (FNTYPE)); \
+ (TREE = function_args_iter_cond (&(ITER))) != NULL_TREE; \
+ function_args_iter_next (&(ITER)))
+
+
+\f
/* In tree.c */
extern unsigned crc32_string (unsigned, const char *);
extern void clean_symbol_name (char *);
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 bool empty_body_p (const_tree);
+extern bool empty_body_p (tree);
extern tree call_expr_arg (tree, int);
extern tree *call_expr_argp (tree, int);
extern tree call_expr_arglist (tree);
+extern bool stdarg_p (tree);
+extern bool prototype_p (tree);
+extern int function_args_count (tree);
extern bool auto_var_in_fn_p (const_tree, const_tree);
\f
/* In stmt.c */
extern tree fold_abs_const (tree, tree);
extern tree fold_indirect_ref_1 (tree, tree);
extern void fold_defer_overflow_warnings (void);
-extern void fold_undefer_overflow_warnings (bool, tree, int);
+extern void fold_undefer_overflow_warnings (bool, const_tree, int);
extern void fold_undefer_and_ignore_overflow_warnings (void);
extern bool fold_deferring_overflow_warnings_p (void);
extern tree maybe_fold_offset_to_reference (tree, tree, tree);
};
extern int operand_equal_p (const_tree, const_tree, unsigned int);
-extern int multiple_of_p (tree, tree, tree);
+extern int multiple_of_p (tree, const_tree, const_tree);
extern tree omit_one_operand (tree, tree, tree);
extern tree omit_two_operands (tree, tree, tree, tree);
extern tree invert_truthvalue (tree);
extern bool tree_expr_nonzero_p (tree);
extern bool tree_expr_nonzero_warnv_p (tree, bool *);
-extern int multiple_of_p (tree, tree, tree);
/* In builtins.c */
extern tree fold_call_expr (tree, bool);
extern bool fold_builtin_next_arg (tree, bool);
extern enum built_in_function builtin_mathfn_code (const_tree);
extern tree build_function_call_expr (tree, tree);
-extern tree fold_build_call_expr (tree, tree, tree, tree);
extern tree fold_builtin_call_array (tree, tree, int, tree *);
-extern void debug_fold_checksum (tree);
+extern void debug_fold_checksum (const_tree);
extern tree build_call_expr (tree, int, ...);
extern tree mathfn_built_in (tree, enum built_in_function fn);
extern tree strip_float_extensions (tree);
extern location_t expr_location (const_tree);
extern void set_expr_location (tree, location_t);
extern bool expr_has_location (const_tree);
-extern
-#ifdef USE_MAPPED_LOCATION
-source_location *
-#else
-source_locus
-#endif
-expr_locus (const_tree);
-extern void set_expr_locus (tree,
+
#ifdef USE_MAPPED_LOCATION
- source_location *loc
+extern source_locus *expr_locus (const_tree);
+extern void set_expr_locus (tree, source_location *);
#else
- source_locus loc
+extern source_locus expr_locus (const_tree);
+extern void set_expr_locus (tree, source_locus loc);
#endif
- );
-extern const char **expr_filename (const_tree);
-extern int *expr_lineno (const_tree);
+extern const char *expr_filename (const_tree);
+extern int expr_lineno (const_tree);
+
extern tree *tree_block (tree);
extern tree *generic_tree_operand (tree, int);
extern tree *generic_tree_type (tree);
+extern location_t *block_nonartificial_location (tree);
/* In function.c */
extern void expand_main_function (void);
extern void init_dummy_function_start (void);
extern void expand_dummy_function_end (void);
extern unsigned int init_function_for_compilation (void);
-extern void allocate_struct_function (tree);
+extern void allocate_struct_function (tree, bool);
+extern void push_struct_function (tree fndecl);
extern void init_function_start (tree);
extern bool use_register_for_decl (const_tree);
extern void generate_setjmp_warnings (void);
/* In attribs.c. */
+extern const struct attribute_spec *lookup_attribute_spec (tree);
+
/* Process the attributes listed in ATTRIBUTES and install them in *NODE,
which is either a DECL (including a TYPE_DECL) or a TYPE. If a DECL,
it should be modified in place; if a TYPE, a copy should be created
/* Assign the RTX to declaration. */
extern void set_decl_rtl (tree, rtx);
-extern void set_decl_incoming_rtl (tree, rtx);
+extern void set_decl_incoming_rtl (tree, rtx, bool);
\f
/* Enum and arrays used for tree allocation stats.
Keep in sync with tree.c:tree_node_kind_names. */