From 833b3afe497cd2430838ddd8a9b1ab9c9b0ba4f2 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Sat, 4 Jun 2005 17:22:21 +0000 Subject: cfgexpand.c (expand_one_var): Use DECL_HAS_VALUE_EXPR_P. 2005-06-01 Daniel Berlin * 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. From-SVN: r100592 --- gcc/gimplify.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/gimplify.c') diff --git a/gcc/gimplify.c b/gcc/gimplify.c index c86d9d0..6834e1a 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1011,7 +1011,8 @@ gimplify_decl_expr (tree *stmt_p) addr = create_tmp_var (ptr_type, get_name (decl)); DECL_IGNORED_P (addr) = 0; t = build_fold_indirect_ref (addr); - DECL_VALUE_EXPR (decl) = t; + SET_DECL_VALUE_EXPR (decl, t); + DECL_HAS_VALUE_EXPR_P (decl) = 1; args = tree_cons (NULL, DECL_SIZE_UNIT (decl), NULL); t = built_in_decls[BUILT_IN_ALLOCA]; @@ -4183,7 +4184,7 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, /* If this is a local variable sized decl, it must be accessed indirectly. Perform that substitution. */ - if (DECL_VALUE_EXPR (tmp)) + if (DECL_HAS_VALUE_EXPR_P (tmp)) { *expr_p = unshare_expr (DECL_VALUE_EXPR (tmp)); ret = GS_OK; -- cgit v1.1