TREE_SYMBOL_REFERENCED in
IDENTIFIER_NODE
CLEANUP_EH_ONLY in
- TARGET_EXPR, WITH_CLEANUP_EXPR, CLEANUP_STMT,
- TREE_LIST elements of a block's cleanup list.
+ TARGET_EXPR, WITH_CLEANUP_EXPR
ASM_INPUT_P in
ASM_EXPR
EH_FILTER_MUST_NOT_THROW in EH_FILTER_EXPR
TYPE_ALIGN_OK in
..._TYPE
+ TREE_THIS_NOTRAP in
+ INDIRECT_REF
+
deprecated_flag:
TREE_DEPRECATED in
#define TREE_CHECK(T, CODE) __extension__ \
({ const tree __t = (T); \
if (TREE_CODE (__t) != (CODE)) \
- tree_check_failed (__t, (CODE), __FILE__, __LINE__, __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE), 0); \
+ __t; })
+
+#define TREE_NOT_CHECK(T, CODE) __extension__ \
+({ const tree __t = (T); \
+ if (TREE_CODE (__t) == (CODE)) \
+ tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE), 0); \
__t; })
#define TREE_CHECK2(T, CODE1, CODE2) __extension__ \
({ const tree __t = (T); \
if (TREE_CODE (__t) != (CODE1) \
&& TREE_CODE (__t) != (CODE2)) \
- tree_check2_failed (__t, (CODE1), (CODE2), __FILE__, __LINE__, \
- __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE1), (CODE2), 0); \
+ __t; })
+
+#define TREE_NOT_CHECK2(T, CODE1, CODE2) __extension__ \
+({ const tree __t = (T); \
+ if (TREE_CODE (__t) == (CODE1) \
+ || TREE_CODE (__t) == (CODE2)) \
+ tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE1), (CODE2), 0); \
__t; })
#define TREE_CHECK3(T, CODE1, CODE2, CODE3) __extension__ \
if (TREE_CODE (__t) != (CODE1) \
&& TREE_CODE (__t) != (CODE2) \
&& TREE_CODE (__t) != (CODE3)) \
- tree_check3_failed (__t, (CODE1), (CODE2), (CODE3), __FILE__, \
- __LINE__, __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE1), (CODE2), (CODE3), 0); \
+ __t; })
+
+#define TREE_NOT_CHECK3(T, CODE1, CODE2, CODE3) __extension__ \
+({ const tree __t = (T); \
+ if (TREE_CODE (__t) == (CODE1) \
+ || TREE_CODE (__t) == (CODE2) \
+ || TREE_CODE (__t) == (CODE3)) \
+ tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE1), (CODE2), (CODE3), 0); \
__t; })
#define TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) __extension__ \
&& TREE_CODE (__t) != (CODE2) \
&& TREE_CODE (__t) != (CODE3) \
&& TREE_CODE (__t) != (CODE4)) \
- tree_check4_failed (__t, (CODE1), (CODE2), (CODE3), (CODE4), \
- __FILE__, __LINE__, __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE1), (CODE2), (CODE3), (CODE4), 0); \
+ __t; })
+
+#define NON_TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) __extension__ \
+({ const tree __t = (T); \
+ if (TREE_CODE (__t) == (CODE1) \
+ || TREE_CODE (__t) == (CODE2) \
+ || TREE_CODE (__t) == (CODE3) \
+ || TREE_CODE (__t) == (CODE4)) \
+ tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE1), (CODE2), (CODE3), (CODE4), 0); \
__t; })
#define TREE_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) __extension__ \
&& TREE_CODE (__t) != (CODE3) \
&& TREE_CODE (__t) != (CODE4) \
&& TREE_CODE (__t) != (CODE5)) \
- tree_check5_failed (__t, (CODE1), (CODE2), (CODE3), (CODE4), \
- (CODE5), __FILE__, __LINE__, __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), 0);\
+ __t; })
+
+#define TREE_NOT_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) __extension__ \
+({ const tree __t = (T); \
+ if (TREE_CODE (__t) == (CODE1) \
+ || TREE_CODE (__t) == (CODE2) \
+ || TREE_CODE (__t) == (CODE3) \
+ || TREE_CODE (__t) == (CODE4) \
+ || TREE_CODE (__t) == (CODE5)) \
+ tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), 0);\
__t; })
#define TREE_CLASS_CHECK(T, CLASS) __extension__ \
(*({const tree __t = (T); \
const int __i = (I); \
if (TREE_CODE (__t) != TREE_VEC) \
- tree_check_failed (__t, TREE_VEC, \
- __FILE__, __LINE__, __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ TREE_VEC, 0); \
if (__i < 0 || __i >= __t->vec.length) \
tree_vec_elt_check_failed (__i, __t->vec.length, \
__FILE__, __LINE__, __FUNCTION__); \
(*({const tree __t = t; \
const int __i = (i); \
if (TREE_CODE (__t) != PHI_NODE) \
- tree_check_failed (__t, PHI_NODE, \
- __FILE__, __LINE__, __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, \
+ PHI_NODE, 0); \
if (__i < 0 || __i >= __t->phi.capacity) \
phi_node_elt_check_failed (__i, __t->phi.num_args, \
__FILE__, __LINE__, __FUNCTION__); \
(*({const tree __t = (T); \
const int __i = (I); \
if (TREE_CODE (__t) != CODE) \
- tree_check_failed (__t, CODE, __FILE__, __LINE__, __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, (CODE), 0);\
if (__i < 0 || __i >= TREE_CODE_LENGTH (CODE)) \
tree_operand_check_failed (__i, (CODE), \
__FILE__, __LINE__, __FUNCTION__); \
({const tree __t = (T); \
const int __i = (I); \
if (TREE_CODE (__t) != (CODE)) \
- tree_check_failed (__t, (CODE), __FILE__, __LINE__, __FUNCTION__); \
+ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, (CODE), 0); \
if (__i < 0 || __i >= TREE_CODE_LENGTH ((CODE))) \
tree_operand_check_failed (__i, (CODE), \
__FILE__, __LINE__, __FUNCTION__); \
&__t->exp.operands[__i]; }))
-extern void tree_check_failed (const tree, enum tree_code,
- const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-extern void tree_check2_failed (const tree, enum tree_code, enum tree_code,
- const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-extern void tree_check3_failed (const tree, enum tree_code, enum tree_code,
- enum tree_code, const char *, int,
- const char *)
- ATTRIBUTE_NORETURN;
-extern void tree_check4_failed (const tree, enum tree_code, enum tree_code,
- enum tree_code, enum tree_code,
- const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-extern void tree_check5_failed (const tree, enum tree_code, enum tree_code,
- enum tree_code, enum tree_code, enum tree_code,
- const char *, int, const char *)
- ATTRIBUTE_NORETURN;
+extern void tree_check_failed (const tree, const char *, int, const char *,
+ ...) ATTRIBUTE_NORETURN;
+extern void tree_not_check_failed (const tree, const char *, int, const char *,
+ ...) ATTRIBUTE_NORETURN;
extern void tree_class_check_failed (const tree, int,
const char *, int, const char *)
ATTRIBUTE_NORETURN;
#else /* not ENABLE_TREE_CHECKING, or not gcc */
#define TREE_CHECK(T, CODE) (T)
+#define TREE_NOT_CHECK(T, CODE) (T)
#define TREE_CHECK2(T, CODE1, CODE2) (T)
+#define TREE_NOT_CHECK2(T, CODE1, CODE2) (T)
#define TREE_CHECK3(T, CODE1, CODE2, CODE3) (T)
+#define TREE_NOT_CHECK3(T, CODE1, CODE2, CODE3) (T)
#define TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) (T)
+#define TREE_NOT_CHECK4(T, CODE1, CODE2, CODE3, CODE4) (T)
#define TREE_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) (T)
+#define TREE_NOT_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) (T)
#define TREE_CLASS_CHECK(T, CODE) (T)
#define EXPR_CHECK(T) (T)
#define NON_TYPE_CHECK(T) (T)
should be cleaned up some day. */
#define TREE_STATIC(NODE) ((NODE)->common.static_flag)
-/* In a TARGET_EXPR, WITH_CLEANUP_EXPR, CLEANUP_STMT, or element of a
- block's cleanup list, means that the pertinent cleanup should only be
- executed if an exception is thrown, not on normal exit of its scope. */
+/* In a TARGET_EXPR, 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)->common.static_flag)
/* In an expr node (usually a conversion) this means the node was made
If this bit is set in an expression, so is TREE_SIDE_EFFECTS. */
#define TREE_THIS_VOLATILE(NODE) ((NODE)->common.volatile_flag)
+/* Nonzero means this node will not trap. In an INDIRECT_REF, means
+ accessing the memory pointed to won't generate a trap. However,
+ this only applies to an object when used appropriately: it doesn't
+ mean that writing a READONLY mem won't trap. */
+#define TREE_THIS_NOTRAP(NODE) ((NODE)->common.nothrow_flag)
+
/* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node,
nonzero means it may not be the lhs of an assignment. */
#define TREE_READONLY(NODE) (NON_TYPE_CHECK (NODE)->common.readonly_flag)
#define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 1)
#define TARGET_EXPR_CLEANUP(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 2)
+/* DECL_EXPR accessor. This gives access to the DECL associated with
+ the given declaration statement. */
+#define DECL_EXPR_DECL(NODE) TREE_OPERAND (DECL_EXPR_CHECK (NODE), 0)
+
#define EXIT_EXPR_COND(NODE) TREE_OPERAND (EXIT_EXPR_CHECK (NODE), 0)
/* SWITCH_EXPR accessors. These give access to the condition, body and
#define SWITCH_BODY(NODE) TREE_OPERAND ((NODE), 1)
#define SWITCH_LABELS(NODE) TREE_OPERAND ((NODE), 2)
-/* CASE_LABEL accessors. These give access to the high and low values
+/* CASE_LABEL_EXPR accessors. These give access to the high and low values
of a case label, respectively. */
#define CASE_LOW(NODE) TREE_OPERAND ((NODE), 0)
#define CASE_HIGH(NODE) TREE_OPERAND ((NODE), 1)
#define EH_FILTER_FAILURE(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 1)
#define EH_FILTER_MUST_NOT_THROW(NODE) TREE_STATIC (EH_FILTER_EXPR_CHECK (NODE))
+/* OBJ_TYPE_REF accessors. */
+#define OBJ_TYPE_REF_EXPR(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 0)
+#define OBJ_TYPE_REF_OBJECT(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 1)
+#define OBJ_TYPE_REF_TOKEN(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 2)
+
struct tree_exp GTY(())
{
struct tree_common common;
};
\f
/* In a PHI_NODE node. */
-#define PHI_RESULT(NODE) PHI_NODE_CHECK (NODE)->phi.result
+#define PHI_RESULT_TREE(NODE) PHI_NODE_CHECK (NODE)->phi.result
+#define PHI_ARG_DEF_TREE(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).def
+
+/* PHI_NODEs for each basic block are chained together in a single linked
+ list. The head of the list is linked from the block annotation, and
+ the link to the next PHI is in PHI_CHAIN. */
+#define PHI_CHAIN(NODE) TREE_CHAIN (PHI_NODE_CHECK (NODE))
/* Nonzero if the PHI node was rewritten by a previous pass through the
SSA renamer. */
-#define PHI_REWRITTEN(NODE) PHI_NODE_CHECK (NODE)->phi.rewritten
-#define PHI_NUM_ARGS(NODE) PHI_NODE_CHECK (NODE)->phi.num_args
-#define PHI_ARG_CAPACITY(NODE) PHI_NODE_CHECK (NODE)->phi.capacity
-#define PHI_ARG_ELT(NODE, I) PHI_NODE_ELT_CHECK (NODE, I)
-#define PHI_ARG_EDGE(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).e
-#define PHI_ARG_DEF(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).def
-#define PHI_ARG_NONZERO(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).nonzero
+#define PHI_REWRITTEN(NODE) PHI_NODE_CHECK (NODE)->phi.rewritten
+#define PHI_NUM_ARGS(NODE) PHI_NODE_CHECK (NODE)->phi.num_args
+#define PHI_ARG_CAPACITY(NODE) PHI_NODE_CHECK (NODE)->phi.capacity
+#define PHI_ARG_ELT(NODE, I) PHI_NODE_ELT_CHECK (NODE, I)
+#define PHI_ARG_EDGE(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).e
+#define PHI_ARG_NONZERO(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).nonzero
struct edge_def;
#define DECL_THREAD_LOCAL(NODE) (VAR_DECL_CHECK (NODE)->decl.thread_local_flag)
/* In a FUNCTION_DECL, the saved representation of the body of the
- entire function. Usually a COMPOUND_STMT, but in C++ this may also
- be a RETURN_INIT, CTOR_INITIALIZER, or TRY_BLOCK. */
+ entire function. */
#define DECL_SAVED_TREE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.saved_tree)
/* List of FUNCTION_DECLs inlined into this function's body. */
struct tree_statement_list_node *head;
struct tree_statement_list_node *tail;
};
+
+#define VALUE_HANDLE_ID(NODE) \
+ (VALUE_HANDLE_CHECK (NODE)->value_handle.id)
+
+#define VALUE_HANDLE_EXPR_SET(NODE) \
+ (VALUE_HANDLE_CHECK (NODE)->value_handle.expr_set)
+
+/* Defined and used in tree-ssa-pre.c. */
+struct value_set;
+
+struct tree_value_handle GTY(())
+{
+ struct tree_common common;
+
+ /* The set of expressions represented by this handle. */
+ struct value_set * GTY ((skip)) expr_set;
+
+ /* Unique ID for this value handle. IDs are handed out in a
+ conveniently dense form starting at 0, so that we can make
+ bitmaps of value handles. */
+ unsigned int id;
+};
\f
enum tree_node_structure_enum {
TS_COMMON,
TS_PHI_NODE,
TS_BLOCK,
TS_STATEMENT_LIST,
+ TS_VALUE_HANDLE,
LAST_TS_ENUM
};
struct tree_phi_node GTY ((tag ("TS_PHI_NODE"))) phi;
struct tree_block GTY ((tag ("TS_BLOCK"))) block;
struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
+ struct tree_value_handle GTY ((tag ("TS_VALUE_HANDLE"))) value_handle;
};
\f
/* Standard named or nameless data types of the C compiler. */
extern void init_ssanames (void);
extern void fini_ssanames (void);
extern tree make_ssa_name (tree, tree);
+extern tree duplicate_ssa_name (tree, tree);
extern void release_ssa_name (tree);
#ifdef GATHER_STATISTICS
extern void ssanames_print_statistics (void);
extern int handled_component_p (tree);
+/* Return a tree of sizetype representing the size, in bytes, of the element
+ of EXP, an ARRAY_REF. */
+
+extern tree array_ref_element_size (tree);
+
+/* Return a tree representing the lower bound of the array mentioned in
+ EXP, an ARRAY_REF. */
+
+extern tree array_ref_low_bound (tree);
+
+/* Return a tree representing the offset, in bytes, of the field referenced
+ by EXP. This does not include any offset in DECL_FIELD_BIT_OFFSET. */
+
+extern tree component_ref_field_offset (tree);
+
/* Given a DECL or TYPE, return the scope in which it was declared, or
NUL_TREE if there is no containing scope. */
extern tree expand_end_stmt_expr (tree);
extern void expand_expr_stmt (tree);
extern void expand_expr_stmt_value (tree, int, int);
-extern int warn_if_unused_value (tree);
+extern int warn_if_unused_value (tree, location_t);
extern void expand_decl_init (tree);
extern void clear_last_expr (void);
extern void expand_label (tree);
extern void preserve_rtl_expr_temps (tree);
extern int aggregate_value_p (tree, tree);
extern void free_temps_for_rtl_expr (tree);
-extern void instantiate_virtual_regs (tree, rtx);
-extern void unshare_all_rtl (tree, rtx);
extern void push_function_context (void);
extern void pop_function_context (void);
extern void push_function_context_to (tree);
extern void indent_to (FILE *, int);
#endif
+/* In tree-inline.c: */
+extern bool debug_find_tree (tree, tree);
+
/* In expr.c */
extern rtx expand_builtin_return_addr (enum built_in_function, int, rtx);
extern void check_max_integer_computation_mode (tree);