tree-ssa.c (redirect_edge_var_map_clear): Fix formatting.
* tree-ssa.c (redirect_edge_var_map_clear): Fix formatting. (free_var_map_entry): New function. (redirect_edge_var_map_destroy): Use it. From-SVN: r140282
This commit is contained in:
parent
4a28309045
commit
a97a7ae98b
@ -1,3 +1,9 @@
|
|||||||
|
2008-09-11 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* tree-ssa.c (redirect_edge_var_map_clear): Fix formatting.
|
||||||
|
(free_var_map_entry): New function.
|
||||||
|
(redirect_edge_var_map_destroy): Use it.
|
||||||
|
|
||||||
2008-09-11 Jan Hubicka <jh@suse.cz>
|
2008-09-11 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
PR middle-end/37448
|
PR middle-end/37448
|
||||||
|
@ -112,7 +112,8 @@ redirect_edge_var_map_clear (edge e)
|
|||||||
void
|
void
|
||||||
redirect_edge_var_map_dup (edge newe, edge olde)
|
redirect_edge_var_map_dup (edge newe, edge olde)
|
||||||
{
|
{
|
||||||
void **new_slot, **old_slot; edge_var_map_vector head;
|
void **new_slot, **old_slot;
|
||||||
|
edge_var_map_vector head;
|
||||||
|
|
||||||
if (!edge_var_maps)
|
if (!edge_var_maps)
|
||||||
return;
|
return;
|
||||||
@ -149,6 +150,17 @@ redirect_edge_var_map_vector (edge e)
|
|||||||
return (edge_var_map_vector) *slot;
|
return (edge_var_map_vector) *slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Used by redirect_edge_var_map_destroy to free all memory. */
|
||||||
|
|
||||||
|
static bool
|
||||||
|
free_var_map_entry (const void *key ATTRIBUTE_UNUSED,
|
||||||
|
void **value,
|
||||||
|
void *data ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
edge_var_map_vector head = (edge_var_map_vector) *value;
|
||||||
|
VEC_free (edge_var_map, heap, head);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/* Clear the edge variable mappings. */
|
/* Clear the edge variable mappings. */
|
||||||
|
|
||||||
@ -157,6 +169,7 @@ redirect_edge_var_map_destroy (void)
|
|||||||
{
|
{
|
||||||
if (edge_var_maps)
|
if (edge_var_maps)
|
||||||
{
|
{
|
||||||
|
pointer_map_traverse (edge_var_maps, free_var_map_entry, NULL);
|
||||||
pointer_map_destroy (edge_var_maps);
|
pointer_map_destroy (edge_var_maps);
|
||||||
edge_var_maps = NULL;
|
edge_var_maps = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user