Commit abde42f7 by Jan Hubicka Committed by Jan Hubicka

Install the proper patch.

	* function.c (put_var_into_stack): Temporarily clear DECL_RTL.
	(assign_params): Avoid setting DECL_RTL to unfinished RTX.
	(expand_function_start): Likewise.
	* stmt.c (expand_decl): Likewise.
	* varasm.c (make_decl_rtx): Likewise.

From-SVN: r44961
parent 3446405d
Fri Aug 17 15:48:57 CEST 2001 Jan Hubicka <jh@suse.cz>
Install the proper patch.
* function.c (put_var_into_stack): Temporarily clear DECL_RTL.
(assign_params): Avoid setting DECL_RTL to unfinished RTX.
(expand_function_start): Likewise.
* stmt.c (expand_decl): Likewise.
* varasm.c (make_decl_rtx): Likewise.
Fri Aug 17 15:41:35 CEST 2001 Jan Hubicka <jh@suse.cz> Fri Aug 17 15:41:35 CEST 2001 Jan Hubicka <jh@suse.cz>
* final.c: Undo my previous accidental checkin. * final.c: Undo my previous accidental checkin.
......
...@@ -1420,7 +1420,14 @@ put_var_into_stack (decl) ...@@ -1420,7 +1420,14 @@ put_var_into_stack (decl)
/* Change the CONCAT into a combined MEM for both parts. */ /* Change the CONCAT into a combined MEM for both parts. */
PUT_CODE (reg, MEM); PUT_CODE (reg, MEM);
/* set_mem_attributes uses DECL_RTL to avoid re-generating of
already computed alias sets. Here we want to re-generate. */
if (DECL_P (decl))
SET_DECL_RTL (decl, NULL);
set_mem_attributes (reg, decl, 1); set_mem_attributes (reg, decl, 1);
if (DECL_P (decl))
SET_DECL_RTL (decl, reg);
/* The two parts are in memory order already. /* The two parts are in memory order already.
Use the lower parts address as ours. */ Use the lower parts address as ours. */
...@@ -4688,10 +4695,10 @@ assign_parms (fndecl) ...@@ -4688,10 +4695,10 @@ assign_parms (fndecl)
appropriately. */ appropriately. */
if (passed_pointer) if (passed_pointer)
{ {
SET_DECL_RTL (parm, rtx x = gen_rtx_MEM (TYPE_MODE (TREE_TYPE (passed_type)),
gen_rtx_MEM (TYPE_MODE (TREE_TYPE (passed_type)), parmreg);
parmreg)); set_mem_attributes (x, parm, 1);
set_mem_attributes (DECL_RTL (parm), parm, 1); SET_DECL_RTL (parm, x);
} }
else else
{ {
...@@ -5030,11 +5037,10 @@ assign_parms (fndecl) ...@@ -5030,11 +5037,10 @@ assign_parms (fndecl)
if (parm == function_result_decl) if (parm == function_result_decl)
{ {
tree result = DECL_RESULT (fndecl); tree result = DECL_RESULT (fndecl);
rtx x = gen_rtx_MEM (DECL_MODE (result), DECL_RTL (parm));
SET_DECL_RTL (result, set_mem_attributes (x, result, 1);
gen_rtx_MEM (DECL_MODE (result), DECL_RTL (parm))); SET_DECL_RTL (result, x);
set_mem_attributes (DECL_RTL (result), result, 1);
} }
} }
...@@ -6451,11 +6457,9 @@ expand_function_start (subr, parms_have_cleanups) ...@@ -6451,11 +6457,9 @@ expand_function_start (subr, parms_have_cleanups)
} }
if (value_address) if (value_address)
{ {
SET_DECL_RTL (DECL_RESULT (subr), rtx x = gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)), value_address);
gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)), set_mem_attributes (x, DECL_RESULT (subr), 1);
value_address)); SET_DECL_RTL (DECL_RESULT (subr), x);
set_mem_attributes (DECL_RTL (DECL_RESULT (subr)),
DECL_RESULT (subr), 1);
} }
} }
else if (DECL_MODE (DECL_RESULT (subr)) == VOIDmode) else if (DECL_MODE (DECL_RESULT (subr)) == VOIDmode)
......
...@@ -3810,15 +3810,17 @@ expand_decl (decl) ...@@ -3810,15 +3810,17 @@ expand_decl (decl)
else if (DECL_SIZE (decl) == 0) else if (DECL_SIZE (decl) == 0)
/* Variable with incomplete type. */ /* Variable with incomplete type. */
{ {
rtx x;
if (DECL_INITIAL (decl) == 0) if (DECL_INITIAL (decl) == 0)
/* Error message was already done; now avoid a crash. */ /* Error message was already done; now avoid a crash. */
SET_DECL_RTL (decl, gen_rtx_MEM (BLKmode, const0_rtx)); x = gen_rtx_MEM (BLKmode, const0_rtx);
else else
/* An initializer is going to decide the size of this array. /* An initializer is going to decide the size of this array.
Until we know the size, represent its address with a reg. */ Until we know the size, represent its address with a reg. */
SET_DECL_RTL (decl, gen_rtx_MEM (BLKmode, gen_reg_rtx (Pmode))); x = gen_rtx_MEM (BLKmode, gen_reg_rtx (Pmode));
set_mem_attributes (DECL_RTL (decl), decl, 1); set_mem_attributes (x, decl, 1);
SET_DECL_RTL (decl, x);
} }
else if (DECL_MODE (decl) != BLKmode else if (DECL_MODE (decl) != BLKmode
/* If -ffloat-store, don't put explicit float vars /* If -ffloat-store, don't put explicit float vars
...@@ -3888,7 +3890,7 @@ expand_decl (decl) ...@@ -3888,7 +3890,7 @@ expand_decl (decl)
else else
/* Dynamic-size object: must push space on the stack. */ /* Dynamic-size object: must push space on the stack. */
{ {
rtx address, size; rtx address, size, x;
/* Record the stack pointer on entry to block, if have /* Record the stack pointer on entry to block, if have
not already done so. */ not already done so. */
...@@ -3913,9 +3915,10 @@ expand_decl (decl) ...@@ -3913,9 +3915,10 @@ expand_decl (decl)
TYPE_ALIGN (TREE_TYPE (decl))); TYPE_ALIGN (TREE_TYPE (decl)));
/* Reference the variable indirect through that rtx. */ /* Reference the variable indirect through that rtx. */
SET_DECL_RTL (decl, gen_rtx_MEM (DECL_MODE (decl), address)); x = gen_rtx_MEM (DECL_MODE (decl), address);
set_mem_attributes (x, decl, 1);
SET_DECL_RTL (decl, x);
set_mem_attributes (DECL_RTL (decl), decl, 1);
/* Indicate the alignment we actually gave this variable. */ /* Indicate the alignment we actually gave this variable. */
#ifdef STACK_BOUNDARY #ifdef STACK_BOUNDARY
......
...@@ -681,6 +681,7 @@ make_decl_rtl (decl, asmspec) ...@@ -681,6 +681,7 @@ make_decl_rtl (decl, asmspec)
const char *name = 0; const char *name = 0;
const char *new_name = 0; const char *new_name = 0;
int reg_number; int reg_number;
rtx x;
/* Check that we are not being given an automatic variable. */ /* Check that we are not being given an automatic variable. */
/* A weak alias has TREE_PUBLIC set but not the other bits. */ /* A weak alias has TREE_PUBLIC set but not the other bits. */
...@@ -848,11 +849,11 @@ make_decl_rtl (decl, asmspec) ...@@ -848,11 +849,11 @@ make_decl_rtl (decl, asmspec)
&& (TREE_PUBLIC (decl) || TREE_STATIC (decl))))) && (TREE_PUBLIC (decl) || TREE_STATIC (decl)))))
TREE_SIDE_EFFECTS (decl) = 1; TREE_SIDE_EFFECTS (decl) = 1;
SET_DECL_RTL (decl, gen_rtx_MEM (DECL_MODE (decl), x = gen_rtx_MEM (DECL_MODE (decl), gen_rtx_SYMBOL_REF (Pmode, name));
gen_rtx_SYMBOL_REF (Pmode, name))); SYMBOL_REF_WEAK (XEXP (x, 0)) = DECL_WEAK (decl);
SYMBOL_REF_WEAK (XEXP (DECL_RTL (decl), 0)) = DECL_WEAK (decl);
if (TREE_CODE (decl) != FUNCTION_DECL) if (TREE_CODE (decl) != FUNCTION_DECL)
set_mem_attributes (DECL_RTL (decl), decl, 1); set_mem_attributes (x, decl, 1);
SET_DECL_RTL (decl, x);
/* Optionally set flags or add text to the name to record information /* Optionally set flags or add text to the name to record information
such as that it is a function name. such as that it is a function name.
......
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