+2004-09-04 Jan Hubicka <jh@suse.cz>
+
+ * cfg.c (free_edge): Use ggc_free.
+ (expunge_block): Use ggc_free.
+ * passes.c (rest_of_clean_state): Free after compilation.
+ * tree-ssa.c (delete_tree_ssa): Free annotations; call release_defs
+ * tree-ssanames.c (release_defs): Ignore non-SSA_NAME arguments.
+
2004-09-03 James E Wilson <wilson@specifixinc.com>
* tree-ssa-alias.c (may_be_aliased): Move TREE_STATIC check after
free_edge (edge e ATTRIBUTE_UNUSED)
{
n_edges--;
- /* ggc_free (e); */
+ ggc_free (e);
}
/* Free the memory associated with the edge structures. */
unlink_block (b);
BASIC_BLOCK (b->index) = NULL;
n_basic_blocks--;
- /* ggc_free (b); */
+ ggc_free (b);
}
\f
/* Create an edge connecting SRC and DEST with flags FLAGS. Return newly
/* We're done with this function. Free up memory if we can. */
free_after_parsing (cfun);
+ free_after_compilation (cfun);
}
\f
/* Remove annotations from every tree in the function. */
FOR_EACH_BB (bb)
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
- bsi_stmt (bsi)->common.ann = NULL;
+ {
+ tree stmt = bsi_stmt (bsi);
+ release_defs (stmt);
+ ggc_free (stmt->common.ann);
+ stmt->common.ann = NULL;
+ }
/* Remove annotations from every referenced variable. */
if (referenced_vars)
{
for (i = 0; i < num_referenced_vars; i++)
- referenced_var (i)->common.ann = NULL;
+ {
+ tree var = referenced_var (i);
+ ggc_free (var->common.ann);
+ var->common.ann = NULL;
+ }
referenced_vars = NULL;
}
ssa_op_iter iter;
FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_ALL_DEFS)
- release_ssa_name (def);
+ if (TREE_CODE (def) == SSA_NAME)
+ release_ssa_name (def);
}