cgraph.h (cgraph_node): Add prev_clone pointer.
* cgraph.h (cgraph_node): Add prev_clone pointer. * cgraph.c (cgraph_remove_node): Remove from doubly linked chain. (cgraph_clone_node): Produce doubly linked chain. From-SVN: r96761
This commit is contained in:
parent
f6d1c3a69b
commit
1655dc9de3
|
@ -1,3 +1,9 @@
|
||||||
|
2005-03-20 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* cgraph.h (cgraph_node): Add prev_clone pointer.
|
||||||
|
* cgraph.c (cgraph_remove_node): Remove from doubly linked chain.
|
||||||
|
(cgraph_clone_node): Produce doubly linked chain.
|
||||||
|
|
||||||
2005-03-20 Joseph S. Myers <joseph@codesourcery.com>
|
2005-03-20 Joseph S. Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* c-common.c (handle_aligned_attribute, check_function_sentinel,
|
* c-common.c (handle_aligned_attribute, check_function_sentinel,
|
||||||
|
|
14
gcc/cgraph.c
14
gcc/cgraph.c
|
@ -422,7 +422,10 @@ cgraph_remove_node (struct cgraph_node *node)
|
||||||
if (*slot == node)
|
if (*slot == node)
|
||||||
{
|
{
|
||||||
if (node->next_clone)
|
if (node->next_clone)
|
||||||
|
{
|
||||||
*slot = node->next_clone;
|
*slot = node->next_clone;
|
||||||
|
node->next_clone->prev_clone = NULL;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htab_clear_slot (cgraph_hash, slot);
|
htab_clear_slot (cgraph_hash, slot);
|
||||||
|
@ -431,11 +434,9 @@ cgraph_remove_node (struct cgraph_node *node)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct cgraph_node *n;
|
node->prev_clone->next_clone = node->next_clone;
|
||||||
|
if (node->next_clone)
|
||||||
for (n = *slot; n->next_clone != node; n = n->next_clone)
|
node->next_clone->prev_clone = node->prev_clone;
|
||||||
continue;
|
|
||||||
n->next_clone = node->next_clone;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* While all the clones are removed after being proceeded, the function
|
/* While all the clones are removed after being proceeded, the function
|
||||||
|
@ -779,7 +780,10 @@ cgraph_clone_node (struct cgraph_node *n)
|
||||||
cgraph_clone_edge (e, new, e->call_expr);
|
cgraph_clone_edge (e, new, e->call_expr);
|
||||||
|
|
||||||
new->next_clone = n->next_clone;
|
new->next_clone = n->next_clone;
|
||||||
|
new->prev_clone = n;
|
||||||
n->next_clone = new;
|
n->next_clone = new;
|
||||||
|
if (new->next_clone)
|
||||||
|
new->next_clone->prev_clone = new;
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,7 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous")))
|
||||||
struct cgraph_node *next_needed;
|
struct cgraph_node *next_needed;
|
||||||
/* Pointer to the next clone. */
|
/* Pointer to the next clone. */
|
||||||
struct cgraph_node *next_clone;
|
struct cgraph_node *next_clone;
|
||||||
|
struct cgraph_node *prev_clone;
|
||||||
PTR GTY ((skip)) aux;
|
PTR GTY ((skip)) aux;
|
||||||
|
|
||||||
struct cgraph_local_info local;
|
struct cgraph_local_info local;
|
||||||
|
|
Loading…
Reference in New Issue