diff options
author | Alexandre Oliva <oliva@lsd.ic.unicamp.br> | 2000-05-24 03:11:27 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2000-05-24 03:11:27 +0000 |
commit | 5c6df0588cce2eefc726cecdec3687df1c8c96d5 (patch) | |
tree | a3b95198ac4d19b68c3e0be07ab4fe0467993def /gcc/emit-rtl.c | |
parent | f8e2da56c10633d47b561d4ca99115837237dded (diff) | |
download | gcc-5c6df0588cce2eefc726cecdec3687df1c8c96d5.zip gcc-5c6df0588cce2eefc726cecdec3687df1c8c96d5.tar.gz gcc-5c6df0588cce2eefc726cecdec3687df1c8c96d5.tar.bz2 |
emit-rtl.c (unshare_all_decls): New function.
* emit-rtl.c (unshare_all_decls): New function.
(unshare_all_rtl): Call it.
From-SVN: r34118
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 2123701..86d8534 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -178,6 +178,7 @@ static rtx make_call_insn_raw PARAMS ((rtx)); static rtx find_line_note PARAMS ((rtx)); static void mark_sequence_stack PARAMS ((struct sequence_stack *)); static void unshare_all_rtl_1 PARAMS ((rtx)); +static void unshare_all_decls PARAMS ((tree)); static hashval_t const_int_htab_hash PARAMS ((const void *)); static int const_int_htab_eq PARAMS ((const void *, const void *)); @@ -1697,6 +1698,9 @@ unshare_all_rtl (fndecl, insn) for (decl = DECL_ARGUMENTS (fndecl); decl; decl = TREE_CHAIN (decl)) DECL_RTL (decl) = copy_rtx_if_shared (DECL_RTL (decl)); + /* Make sure that virtual stack slots are not shared. */ + unshare_all_decls (DECL_INITIAL (fndecl)); + /* Unshare just about everything else. */ unshare_all_rtl_1 (insn); @@ -1754,6 +1758,23 @@ unshare_all_rtl_1 (insn) } } +/* Go through all virtual stack slots of a function and copy any + shared structure. */ +static void +unshare_all_decls (blk) + tree blk; +{ + tree t; + + /* Copy shared decls. */ + for (t = BLOCK_VARS (blk); t; t = TREE_CHAIN (t)) + DECL_RTL (t) = copy_rtx_if_shared (DECL_RTL (t)); + + /* Now process sub-blocks. */ + for (t = BLOCK_SUBBLOCKS (blk); t; t = TREE_CHAIN (t)) + unshare_all_decls (t); +} + /* Mark ORIG as in use, and return a copy of it if it was already in use. Recursively does the same for subexpressions. */ |