summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-26 01:49:38 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-26 01:49:38 +0000
commit01dc9f0c50c06be1c10803d0f0c3f952c3cd4414 (patch)
treeb60fc94b7dc8688d66ee58706f53651915ae1741 /gcc
parent9fb5b53d80efe27d31413f8e81c8437ae96bbd58 (diff)
downloadgcc-01dc9f0c50c06be1c10803d0f0c3f952c3cd4414.tar.gz
* emit-rtl.c (reset_used_decls): New function.
(unshare_all_rtl_again): Call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/emit-rtl.c23
2 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a0a49c71768..b3866d9bb81 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-25 Alexandre Oliva <aoliva@cygnus.com>
+
+ * emit-rtl.c (reset_used_decls): New function.
+ (unshare_all_rtl_again): Call it.
+
2000-05-25 Zack Weinberg <zack@wolery.cumb.org>
* cpplex.c (maybe_macroexpand): Warn about function-like
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index a455c1e44fc..d9a6c65c9cf 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -179,6 +179,7 @@ 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 void reset_used_decls PARAMS ((tree));
static hashval_t const_int_htab_hash PARAMS ((const void *));
static int const_int_htab_eq PARAMS ((const void *,
const void *));
@@ -1733,6 +1734,9 @@ unshare_all_rtl_again (insn)
reset_used_flags (LOG_LINKS (p));
}
+ /* Make sure that virtual stack slots are not shared. */
+ reset_used_decls (DECL_INITIAL (cfun->decl));
+
/* Make sure that virtual parameters are not shared. */
for (decl = DECL_ARGUMENTS (cfun->decl); decl; decl = TREE_CHAIN (decl))
reset_used_flags (DECL_RTL (decl));
@@ -1768,13 +1772,30 @@ unshare_all_decls (blk)
/* Copy shared decls. */
for (t = BLOCK_VARS (blk); t; t = TREE_CHAIN (t))
- DECL_RTL (t) = copy_rtx_if_shared (DECL_RTL (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);
}
+/* Go through all virtual stack slots of a function and mark them as
+ not shared. */
+static void
+reset_used_decls (blk)
+ tree blk;
+{
+ tree t;
+
+ /* Mark decls. */
+ for (t = BLOCK_VARS (blk); t; t = TREE_CHAIN (t))
+ reset_used_flags (DECL_RTL (t));
+
+ /* Now process sub-blocks. */
+ for (t = BLOCK_SUBBLOCKS (blk); t; t = TREE_CHAIN (t))
+ reset_used_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. */