diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-04 17:22:21 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-04 17:22:21 +0000 |
commit | 75fa4f8228a5394cf18cbe0a924fddd5415287c0 (patch) | |
tree | 7157b77ca7d19813485d549c8f67ec67a23aee72 /gcc/tree.h | |
parent | 2f138c1cfbd62fbaa71196fb5e9adb90c297c468 (diff) | |
download | gcc-75fa4f8228a5394cf18cbe0a924fddd5415287c0.tar.gz |
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 12 |
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 |