Commit 4846b435 by Paolo Bonzini Committed by Paolo Bonzini

expr.c (expand_var): Delete it.

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.

From-SVN: r133830
parent 4fefbcdb
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
......
......@@ -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))
......
......@@ -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.
......
......@@ -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);
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment