+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>
* final.c: Undo my previous accidental checkin.
/* Change the CONCAT into a combined MEM for both parts. */
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);
+ if (DECL_P (decl))
+ SET_DECL_RTL (decl, reg);
/* The two parts are in memory order already.
Use the lower parts address as ours. */
appropriately. */
if (passed_pointer)
{
- SET_DECL_RTL (parm,
- gen_rtx_MEM (TYPE_MODE (TREE_TYPE (passed_type)),
- parmreg));
- set_mem_attributes (DECL_RTL (parm), parm, 1);
+ rtx x = gen_rtx_MEM (TYPE_MODE (TREE_TYPE (passed_type)),
+ parmreg);
+ set_mem_attributes (x, parm, 1);
+ SET_DECL_RTL (parm, x);
}
else
{
if (parm == function_result_decl)
{
tree result = DECL_RESULT (fndecl);
+ rtx x = gen_rtx_MEM (DECL_MODE (result), DECL_RTL (parm));
- SET_DECL_RTL (result,
- gen_rtx_MEM (DECL_MODE (result), DECL_RTL (parm)));
-
- set_mem_attributes (DECL_RTL (result), result, 1);
+ set_mem_attributes (x, result, 1);
+ SET_DECL_RTL (result, x);
}
}
}
if (value_address)
{
- SET_DECL_RTL (DECL_RESULT (subr),
- gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)),
- value_address));
- set_mem_attributes (DECL_RTL (DECL_RESULT (subr)),
- DECL_RESULT (subr), 1);
+ rtx x = gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)), value_address);
+ set_mem_attributes (x, DECL_RESULT (subr), 1);
+ SET_DECL_RTL (DECL_RESULT (subr), x);
}
}
else if (DECL_MODE (DECL_RESULT (subr)) == VOIDmode)
else if (DECL_SIZE (decl) == 0)
/* Variable with incomplete type. */
{
+ rtx x;
if (DECL_INITIAL (decl) == 0)
/* 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
/* An initializer is going to decide the size of this array.
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
/* If -ffloat-store, don't put explicit float vars
else
/* 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
not already done so. */
TYPE_ALIGN (TREE_TYPE (decl)));
/* 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. */
#ifdef STACK_BOUNDARY
const char *name = 0;
const char *new_name = 0;
int reg_number;
+ rtx x;
/* Check that we are not being given an automatic variable. */
/* A weak alias has TREE_PUBLIC set but not the other bits. */
&& (TREE_PUBLIC (decl) || TREE_STATIC (decl)))))
TREE_SIDE_EFFECTS (decl) = 1;
- SET_DECL_RTL (decl, gen_rtx_MEM (DECL_MODE (decl),
- gen_rtx_SYMBOL_REF (Pmode, name)));
- SYMBOL_REF_WEAK (XEXP (DECL_RTL (decl), 0)) = DECL_WEAK (decl);
+ x = gen_rtx_MEM (DECL_MODE (decl), gen_rtx_SYMBOL_REF (Pmode, name));
+ SYMBOL_REF_WEAK (XEXP (x, 0)) = DECL_WEAK (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
such as that it is a function name.