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:
Jan Hubicka 2008-09-11 14:36:05 +02:00 committed by Jan Hubicka
parent 4a28309045
commit a97a7ae98b
2 changed files with 20 additions and 1 deletions

View File

@ -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>
PR middle-end/37448

View File

@ -112,7 +112,8 @@ redirect_edge_var_map_clear (edge e)
void
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)
return;
@ -149,6 +150,17 @@ redirect_edge_var_map_vector (edge e)
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. */
@ -157,6 +169,7 @@ redirect_edge_var_map_destroy (void)
{
if (edge_var_maps)
{
pointer_map_traverse (edge_var_maps, free_var_map_entry, NULL);
pointer_map_destroy (edge_var_maps);
edge_var_maps = NULL;
}