diff options
author | Jan Hubicka <jh@suse.cz> | 2001-08-17 15:50:15 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-08-17 13:50:15 +0000 |
commit | abde42f7c757b26e71298e8cae90b0692bdd9fd7 (patch) | |
tree | c1f73b83f17d5ed379df9f03a91168c269c58e9b /gcc/function.c | |
parent | 3446405d5e9afd01c9afd6d6cc43803aa8c5890c (diff) | |
download | gcc-abde42f7c757b26e71298e8cae90b0692bdd9fd7.zip gcc-abde42f7c757b26e71298e8cae90b0692bdd9fd7.tar.gz gcc-abde42f7c757b26e71298e8cae90b0692bdd9fd7.tar.bz2 |
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
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/gcc/function.c b/gcc/function.c index 450c400..0a6ed73 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1420,7 +1420,14 @@ put_var_into_stack (decl) /* 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. */ @@ -4688,10 +4695,10 @@ assign_parms (fndecl) 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 { @@ -5030,11 +5037,10 @@ assign_parms (fndecl) 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); } } @@ -6451,11 +6457,9 @@ expand_function_start (subr, parms_have_cleanups) } 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) |