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
This commit is contained in:
Jan Hubicka 2007-01-17 00:42:06 +01:00 committed by Jan Hubicka
parent 80a3dc41f4
commit 109c8d3934
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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.

View File

@ -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;