+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
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);
}
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))
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.
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);
/* ??? 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,