diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-26 20:17:32 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-26 20:17:32 +0000 |
commit | f4ec5ce196a540fee89c85fb94d8a0027455274c (patch) | |
tree | 067f3bb521f2fed42cb3fd52c2a69fe71a9ac756 /gcc/cgraph.c | |
parent | c32222a35541ad4b191d728a97a7420dc152cebd (diff) | |
download | gcc-f4ec5ce196a540fee89c85fb94d8a0027455274c.tar.gz |
PR tree-optimization/27882
* cgraph.c (cgraph_remove_node): Clear needed, reachable, next, previous
and decl fields.
* cgraphunit.c (cgraph_reset_node): Expect cgraph_remove_node to kill
next pointer
(cgraph_analyze_compilation_unit): Likewise.
* ipa.c (cgraph_remove_unreachable_nodes): Likewise.
* ipa-inline.c (cgraph_decide_recursive_inlining): Likewise.
(cgraph_early_inlinine): Make order garbage collected.
* Makefile.in (gt-ipa-inline): New garbagecollected file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115763 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index e20c8d5336e..8d841b46e0d 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -452,6 +452,9 @@ cgraph_remove_node (struct cgraph_node *node) cgraph_node_remove_callers (node); cgraph_node_remove_callees (node); + /* Incremental inlining access removed nodes stored in the postorder list. + */ + node->needed = node->reachable = false; while (node->nested) cgraph_remove_node (node->nested); if (node->origin) @@ -468,6 +471,8 @@ cgraph_remove_node (struct cgraph_node *node) cgraph_nodes = node->next; if (node->next) node->next->previous = node->previous; + node->next = NULL; + node->previous = NULL; slot = htab_find_slot (cgraph_hash, node, NO_INSERT); if (*slot == node) { @@ -515,6 +520,7 @@ cgraph_remove_node (struct cgraph_node *node) DECL_STRUCT_FUNCTION (node->decl) = NULL; DECL_INITIAL (node->decl) = error_mark_node; } + node->decl = NULL; cgraph_n_nodes--; /* Do not free the structure itself so the walk over chain can continue. */ } |