2008-04-02 Paolo Bonzini <bonzini@gnu.org>
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Apr 2008 10:01:43 +0000 (10:01 +0000)
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Apr 2008 10:01:43 +0000 (10:01 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133830 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfgexpand.c
gcc/expr.c
gcc/expr.h
gcc/function.c

index e64b233..8efd317 100644 (file)
@@ -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
index cd04a62..f50ab4a 100644 (file)
@@ -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))
index 7ecbccf..dbb2b4c 100644 (file)
@@ -6649,39 +6649,6 @@ emutls_var_address (tree var)
   return fold_convert (build_pointer_type (TREE_TYPE (var)), call);
 }
 \f
-/* 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.
index e3b2471..a1352a1 100644 (file)
@@ -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);
index 5ca83b1..56f9865 100644 (file)
@@ -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,