/* 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 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
This file is part of GCC.
struct gimple_stmt GTY(())
{
struct tree_base base;
- source_locus locus;
+ location_t locus;
tree block;
/* FIXME tuples: Eventually this should be of type ``struct gimple_expr''. */
tree GTY ((length ("TREE_CODE_LENGTH (TREE_CODE (&%h))"))) operands[1];
expression.
CALL_EXPR_TAILCALL in CALL_EXPR
CASE_LOW_SEEN in CASE_LABEL_EXPR
+ RETURN_EXPR_OUTCOME in RETURN_EXPR
static_flag:
IDENTIFIER_NODE
CLEANUP_EH_ONLY in
TARGET_EXPR, WITH_CLEANUP_EXPR
+ TRY_CATCH_IS_CLEANUP in
+ TRY_CATCH_EXPR
ASM_INPUT_P in
ASM_EXPR
EH_FILTER_MUST_NOT_THROW in EH_FILTER_EXPR
all types
DECL_UNSIGNED in
all decls
- BIT_FIELD_REF_UNSIGNED in
- BIT_FIELD_REF
asm_written_flag:
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:
#define CASE_LOW_SEEN(NODE) \
(CASE_LABEL_EXPR_CHECK (NODE)->base.addressable_flag)
+#define PREDICT_EXPR_OUTCOME(NODE) \
+ (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag)
+#define PREDICT_EXPR_PREDICTOR(NODE) \
+ ((enum br_predictor)tree_low_cst (TREE_OPERAND (PREDICT_EXPR_CHECK (NODE), 0), 0))
+
/* In a VAR_DECL, nonzero means allocate static storage.
In a FUNCTION_DECL, nonzero if function has been defined.
In a CONSTRUCTOR, nonzero means allocate static storage.
should be cleaned up some day. */
#define TREE_STATIC(NODE) ((NODE)->base.static_flag)
-/* In a TARGET_EXPR, WITH_CLEANUP_EXPR, means that the pertinent cleanup
+/* In a TARGET_EXPR or WITH_CLEANUP_EXPR, means that the pertinent cleanup
should only be executed if an exception is thrown, not on normal exit
of its scope. */
#define CLEANUP_EH_ONLY(NODE) ((NODE)->base.static_flag)
+/* In a TRY_CATCH_EXPR, means that the handler should be considered a
+ separate cleanup in honor_protect_cleanup_actions. */
+#define TRY_CATCH_IS_CLEANUP(NODE) \
+ (TRY_CATCH_EXPR_CHECK (NODE)->base.static_flag)
+
/* Used as a temporary field on a CASE_LABEL_EXPR to indicate that the
CASE_HIGH operand has been processed. */
#define CASE_HIGH_SEEN(NODE) \
#define DECL_UNSIGNED(NODE) \
(DECL_COMMON_CHECK (NODE)->base.unsigned_flag)
-/* In a BIT_FIELD_REF, means the bitfield is to be interpreted as unsigned. */
-#define BIT_FIELD_REF_UNSIGNED(NODE) \
- (BIT_FIELD_REF_CHECK (NODE)->base.unsigned_flag)
-
/* 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.
struct tree_exp GTY(())
{
struct tree_common common;
- source_locus locus;
+ location_t locus;
tree block;
tree GTY ((special ("tree_exp"),
desc ("TREE_CODE ((tree) &%0)")))
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. */
#define TYPE_IS_SIZETYPE(NODE) \
(INTEGER_TYPE_CHECK (NODE)->type.no_force_blk_flag)
-/* In a FUNCTION_TYPE, indicates that the function returns with the stack
- pointer depressed. */
-#define TYPE_RETURNS_STACK_DEPRESSED(NODE) \
- (FUNCTION_TYPE_CHECK (NODE)->type.no_force_blk_flag)
-
/* Nonzero in a type considered volatile as a whole. */
#define TYPE_VOLATILE(NODE) (TYPE_CHECK (NODE)->base.volatile_flag)
#define DECL_SOURCE_LOCATION(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.locus)
#define DECL_SOURCE_FILE(NODE) LOCATION_FILE (DECL_SOURCE_LOCATION (NODE))
#define DECL_SOURCE_LINE(NODE) LOCATION_LINE (DECL_SOURCE_LOCATION (NODE))
-#ifdef USE_MAPPED_LOCATION
#define DECL_IS_BUILTIN(DECL) \
(DECL_SOURCE_LOCATION (DECL) <= BUILTINS_LOCATION)
-#else
-#define DECL_IS_BUILTIN(DECL) (DECL_SOURCE_LINE(DECL) == 0)
-#endif
/* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL,
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. */
#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. */
not an alias. */
#define DECL_IS_MALLOC(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.malloc_flag)
+/* Nonzero in a FUNCTION_DECL means this function should be treated as
+ C++ operator new, meaning that it returns a pointer for which we
+ should not use type based aliasing. */
+#define DECL_IS_OPERATOR_NEW(NODE) \
+ (FUNCTION_DECL_CHECK (NODE)->function_decl.operator_new_flag)
+
/* Nonzero in a FUNCTION_DECL means this function may return more
than once. */
#define DECL_IS_RETURNS_TWICE(NODE) \
unsigned novops_flag : 1;
unsigned returns_twice_flag : 1;
unsigned malloc_flag : 1;
+ unsigned operator_new_flag : 1;
unsigned pure_flag : 1;
unsigned declared_inline_flag : 1;
unsigned regdecl_flag : 1;
- unsigned inline_flag : 1;
+ unsigned inline_flag : 1;
unsigned no_instrument_function_entry_exit : 1;
unsigned no_limit_stack : 1;
unsigned disregard_inline_limits : 1;
- /* 5 bits left */
+ /* 4 bits left */
};
/* For a TYPE_DECL, holds the "original" type. (TREE_TYPE has the copy.) */
extern tree build_fn_decl (const char *, tree);
#define build_decl(c,t,q) build_decl_stat (c,t,q MEM_STAT_INFO)
extern tree build_block (tree, tree, tree, tree);
-#ifndef USE_MAPPED_LOCATION
-extern void annotate_with_file_line (tree, const char *, int);
-extern void annotate_with_locus (tree, location_t);
-#endif
extern tree build_empty_stmt (void);
extern tree build_omp_clause (enum omp_clause_code);
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 get_narrower (tree, int *);
-/* Given an expression EXP that may be a COMPONENT_REF or an ARRAY_REF,
- look for nested component-refs or array-refs at constant positions
- and find the ultimate containing object, which is returned. */
+/* Return true if T is an expression that get_inner_reference handles. */
+
+extern int handled_component_p (const_tree);
+
+/* Given an expression EXP that is a handled_component_p,
+ look for the ultimate containing object, which is returned and specify
+ the access position and size. */
extern tree get_inner_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
tree *, enum machine_mode *, int *, int *,
extern bool contains_packed_reference (const_tree exp);
-/* Return 1 if T is an expression that get_inner_reference handles. */
-
-extern int handled_component_p (const_tree);
-
/* Return a tree of sizetype representing the size, in bytes, of the element
of EXP, an ARRAY_REF. */
extern enum tree_code invert_tree_comparison (enum tree_code, bool);
extern bool tree_expr_nonzero_p (tree);
+extern bool tree_unary_nonzero_warnv_p (enum tree_code, tree, tree, bool *);
+extern bool tree_binary_nonzero_warnv_p (enum tree_code, tree, tree, tree op1,
+ bool *);
+extern bool tree_single_nonzero_warnv_p (tree, bool *);
+extern bool tree_expr_nonzero_warnv_p (tree, bool *);
+extern bool tree_unary_nonnegative_warnv_p (enum tree_code, tree, tree, bool *);
+extern bool tree_binary_nonnegative_warnv_p (enum tree_code, tree, tree, tree,
+ bool *);
+extern bool tree_single_nonnegative_warnv_p (tree t, bool *strict_overflow_p);
+extern bool tree_invalid_nonnegative_warnv_p (tree t, bool *strict_overflow_p);
+extern bool tree_call_nonnegative_warnv_p (enum tree_code code, tree, tree,
+ tree, tree, bool *);
+
extern bool tree_expr_nonzero_warnv_p (tree, bool *);
+extern bool fold_real_zero_addition_p (const_tree, const_tree, int);
+
/* In builtins.c */
extern tree fold_call_expr (tree, bool);
extern tree fold_builtin_fputs (tree, tree, bool, bool, tree);
/* In convert.c */
extern tree strip_float_extensions (tree);
-/* In alias.c */
-extern void record_component_aliases (tree);
-extern alias_set_type get_alias_set (tree);
-extern int alias_sets_conflict_p (alias_set_type, alias_set_type);
-extern int alias_sets_must_conflict_p (alias_set_type, alias_set_type);
-extern int objects_must_conflict_p (tree, tree);
-
/* In tree.c */
extern int really_constant_p (const_tree);
extern int int_fits_type_p (const_tree, const_tree);
+#ifndef GENERATOR_FILE
extern void get_type_static_bounds (const_tree, mpz_t, mpz_t);
+#endif
extern bool variably_modified_type_p (tree, tree);
extern int tree_log2 (const_tree);
extern int tree_floor_log2 (const_tree);
extern void set_expr_location (tree, location_t);
extern bool expr_has_location (const_tree);
-#ifdef USE_MAPPED_LOCATION
-extern source_locus *expr_locus (const_tree);
+extern location_t *expr_locus (const_tree);
extern void set_expr_locus (tree, source_location *);
-#else
-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 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 int aggregate_value_p (const_tree, const_tree);
extern void push_function_context (void);
extern void pop_function_context (void);
-extern void push_function_context_to (tree);
-extern void pop_function_context_from (tree);
extern tree gimplify_parameters (void);
/* In print-rtl.c */
/* Nonzero if this is a call to "pure" function (like const function,
but may read memory. */
#define ECF_PURE 128
-/* Nonzero if this is a call to a function that returns with the stack
- pointer depressed. */
-#define ECF_SP_DEPRESSED 256
/* Create libcall block around the call. */
-#define ECF_LIBCALL_BLOCK 512
+#define ECF_LIBCALL_BLOCK 256
/* Function does not read or write memory (but may have side effects, so
it does not necessarily fit ECF_CONST). */
-#define ECF_NOVOPS 1024
+#define ECF_NOVOPS 512
extern int flags_from_decl_or_type (const_tree);
extern int call_expr_flags (const_tree);
/* 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. */