diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e64b233ac6bf3e79434816e5ba82c4632730829f..8efd317842efd839f15cb6351be0c797cc177cb2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2008-04-02 Paolo Bonzini <bonzini@gnu.org> + + * 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 <hutchinsonamdy@aim.com> PR rtl-optimization/35542 diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index cd04a625ec8b70fb0f58fc9eaa846e9d3bebd08e..f50ab4ab964e15e693c0cdba3b3d622ab3f4cf6e 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 7ecbccf633cac8484952a9148d3efb882a730d66..dbb2b4c468ccc2be97b9ea131a9d79b7eb65f755 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 e3b2471393a4712abe222a760f185845a41ba584..a1352a1ee50dcbc42ee87eb17f89286849371285 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 5ca83b1857b7fbfae36efb3af770031cdde575e0..56f9865be626380711bc0570f7f5e30110a057e2 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,