From 4846b4355c6f0253228e64ade49b8bf34227d693 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 2 Apr 2008 10:01:43 +0000 Subject: [PATCH] expr.c (expand_var): Delete it. 2008-04-02 Paolo Bonzini * expr.c (expand_var): Delete it. * expr.h (expand_var): Delete prototype. * function.c (expand_function_start): Use expand_decl instead. * cfgexpand.c (expand_one_static_var, expand_one_var): Don't call langhook. From-SVN: r133830 --- gcc/ChangeLog | 8 ++++++++ gcc/cfgexpand.c | 10 +--------- gcc/expr.c | 33 --------------------------------- gcc/expr.h | 2 -- gcc/function.c | 4 +++- 5 files changed, 12 insertions(+), 45 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e64b233ac6b..8efd317842e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2008-04-02 Paolo Bonzini + + * expr.c (expand_var): Delete it. + * expr.h (expand_var): Delete prototype. + * function.c (expand_function_start): Use expand_decl instead. + * cfgexpand.c (expand_one_static_var, expand_one_var): Don't call + langhook. + 2008-04-02 Andy Hutchinson PR rtl-optimization/35542 diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index cd04a625ec8..f50ab4ab964 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -643,11 +643,6 @@ expand_one_static_var (tree var) if (TREE_ASM_WRITTEN (var)) return; - /* Give the front end a chance to do whatever. In practice, this is - resolving duplicate names for IMA in C. */ - if (lang_hooks.expand_decl (var)) - return; - /* Otherwise, just emit the variable. */ rest_of_decl_compilation (var, 0, 0); } @@ -749,10 +744,7 @@ static HOST_WIDE_INT expand_one_var (tree var, bool toplevel, bool really_expand) { if (TREE_CODE (var) != VAR_DECL) - { - if (really_expand) - lang_hooks.expand_decl (var); - } + ; else if (DECL_EXTERNAL (var)) ; else if (DECL_HAS_VALUE_EXPR_P (var)) diff --git a/gcc/expr.c b/gcc/expr.c index 7ecbccf633c..dbb2b4c468c 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6649,39 +6649,6 @@ emutls_var_address (tree var) return fold_convert (build_pointer_type (TREE_TYPE (var)), call); } -/* Expands variable VAR. */ - -void -expand_var (tree var) -{ - if (DECL_EXTERNAL (var)) - return; - - if (TREE_STATIC (var)) - /* If this is an inlined copy of a static local variable, - look up the original decl. */ - var = DECL_ORIGIN (var); - - if (TREE_STATIC (var) - ? !TREE_ASM_WRITTEN (var) - : !DECL_RTL_SET_P (var)) - { - if (TREE_CODE (var) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (var)) - /* Should be ignored. */; - else if (lang_hooks.expand_decl (var)) - /* OK. */; - else if (TREE_CODE (var) == VAR_DECL && !TREE_STATIC (var)) - expand_decl (var); - else if (TREE_CODE (var) == VAR_DECL && TREE_STATIC (var)) - rest_of_decl_compilation (var, 0, 0); - else - /* No expansion needed. */ - gcc_assert (TREE_CODE (var) == TYPE_DECL - || TREE_CODE (var) == CONST_DECL - || TREE_CODE (var) == FUNCTION_DECL - || TREE_CODE (var) == LABEL_DECL); - } -} /* Subroutine of expand_expr. Expand the two operands of a binary expression EXP0 and EXP1 placing the results in OP0 and OP1. diff --git a/gcc/expr.h b/gcc/expr.h index e3b2471393a..a1352a1ee50 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -520,8 +520,6 @@ expand_normal (tree exp) return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL); } -extern void expand_var (tree); - /* At the start of a function, record that we have no previously-pushed arguments waiting to be popped. */ extern void init_pending_stack_adjust (void); diff --git a/gcc/function.c b/gcc/function.c index 5ca83b1857b..56f9865be62 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4259,7 +4259,9 @@ expand_function_start (tree subr) /* ??? We need to do this save early. Unfortunately here is before the frame variable gets declared. Help out... */ - expand_var (TREE_OPERAND (cfun->nonlocal_goto_save_area, 0)); + tree var = TREE_OPERAND (cfun->nonlocal_goto_save_area, 0); + if (!DECL_RTL_SET_P (var)) + expand_decl (var); t_save = build4 (ARRAY_REF, ptr_type_node, cfun->nonlocal_goto_save_area, -- 2.30.2