aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2007-01-17 00:42:06 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2007-01-16 23:42:06 +0000
commit109c8d3934b3748a2fdb061c9a250b30b54fdf5b (patch)
tree021e6b777faca34f0b16334c7b7ec2720de79db4
parent80a3dc41f4dfaa5d940f1ade2c8cd30c00a67b89 (diff)
downloadgcc-109c8d3934b3748a2fdb061c9a250b30b54fdf5b.zip
gcc-109c8d3934b3748a2fdb061c9a250b30b54fdf5b.tar.gz
gcc-109c8d3934b3748a2fdb061c9a250b30b54fdf5b.tar.bz2
tree-ssanames.c (release_dead_ssa_names): Instead of ggc_freeing the names...
* tree-ssanames.c (release_dead_ssa_names): Instead of ggc_freeing the names, just unlink the chain so we don't crash on dangling pointers to dead SSA names. From-SVN: r120837
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssanames.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7d44816..a8e0c18 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2007-01-16 Jan Hubicka <jh@suse.cz>
+ * tree-ssanames.c (release_dead_ssa_names): Instead of ggc_freeing
+ the names, just unlink the chain so we don't crash on dangling pointers
+ to dead SSA names.
+
+2007-01-16 Jan Hubicka <jh@suse.cz>
+
* cgraph.h (cgraph_decide_inlining_incrementally): Kill.
* tree-pass.h: Reorder to make IPA passes appear toegher.
(pass_early_inline, pass_inline_parameters, pass_apply_inline): Declare.
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index d9ab940..07b83f8 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -325,7 +325,12 @@ release_dead_ssa_names (void)
for (t = FREE_SSANAMES (cfun); t; t = next)
{
next = TREE_CHAIN (t);
- ggc_free (t);
+ /* Dangling pointers might make GGC to still see dead SSA names, so it is
+ important to unlink the list and avoid GGC from seeing all subsequent
+ SSA names. In longer run we want to have all dangling pointers here
+ removed (since they usually go trhough dead statements that consume
+ considerable amounts of memory). */
+ TREE_CHAIN (t) = NULL_TREE;
n++;
}
FREE_SSANAMES (cfun) = NULL;