aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dbrelin.org>2005-06-04 17:22:21 +0000
committerDaniel Berlin <dberlin@dbrelin.org>2005-06-04 17:22:21 +0000
commit50306aecbb1be39e72a851f4e521637ec90b7882 (patch)
tree7157b77ca7d19813485d549c8f67ec67a23aee72 /gcc/tree.h
parent656dd1810cbaa25983bfe05914b16f5ab9e860ab (diff)
2005-06-01 Daniel Berlin <dberlin@dberlin.org>
* cfgexpand.c (expand_one_var): Use DECL_HAS_VALUE_EXPR_P. * dwarf2out.c (loc_descriptor_from_tree_1): Ditto. * expr.c (expand_var): Ditto. * function.c (gimplify_parameters): Use SET_DECL_VALUE_EXPR too. * gimplify.c (gimplify_decl_expr): Ditto. (gimplify_expr): Ditto. * tree-mudflap.c (mf_decl_eligible_p): Use DECL_HAS_VALUE_EXPR_P. * tree.c (value_expr_for_decl): New. (print_value_expr_statistics): New. (init_ttree): Init value_expr_for_decl. (decl_value_expr_lookup): New. (decl_value_expr_insert): Ditto. (copy_node_stat): Copy DECL_VALUE_EXPR status. * tree.h (DECL_VALUE_EXPR): Use hashtable. (SET_DECL_VALUE_EXPR): New. (DECL_HAS_VALUE_EXPR_P): New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@100592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index ced72b17bce..fd3e45d6781 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2187,12 +2187,19 @@ extern void decl_debug_expr_insert (tree, tree);
entire function. */
#define DECL_SAVED_TREE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.saved_tree)
+extern tree decl_value_expr_lookup (tree);
+extern void decl_value_expr_insert (tree, tree);
+
/* In a VAR_DECL or PARM_DECL, the location at which the value may be found,
if transformations have made this more complicated than evaluating the
decl itself. This should only be used for debugging; once this field has
been set, the decl itself may not legitimately appear in the function. */
+#define DECL_HAS_VALUE_EXPR_P(NODE) \
+ (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl.has_value_expr)
#define DECL_VALUE_EXPR(NODE) \
- (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl.saved_tree)
+ (decl_value_expr_lookup (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)))
+#define SET_DECL_VALUE_EXPR(NODE, VAL) \
+ (decl_value_expr_insert (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL), VAL))
/* Nonzero in a FUNCTION_DECL means this function should be treated
as if it were a malloc, meaning it returns a pointer that is
@@ -2412,7 +2419,8 @@ struct tree_decl GTY(())
unsigned returns_twice_flag : 1;
unsigned seen_in_bind_expr : 1;
unsigned novops_flag : 1;
- /* 9 unused bits. */
+ unsigned has_value_expr:1;
+ /* 8 unused bits. */
union tree_decl_u1 {
/* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is