+2007-07-14 Dirk Mueller <dmueller@suse.de>
+
+ * omega.c (coalesce): Fix memory leak on early exit.
+ * matrix-reorg.c (check_allocation_function): Likewise.
+ * tree-vect-transform.c (vect_get_new_vect_var): free result
+ of concat().
+ * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
+ pass pointer to edge vector
+ (partition_hot_cold_basic_blocks): Fix memory leak.
+ * collect2.c (prefix_from_string): Free temporary storage.
+ * reload1.c (fixup_abnormal_edges): Free sbitmap.
+
2007-07-14 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.h (DO_GLOBAL_CTORS_BODY): Add void to prototype.
static bool copy_bb_p (basic_block, int);
static int get_uncond_jump_length (void);
static bool push_to_next_round_p (basic_block, int, int, int, gcov_type);
-static void find_rarely_executed_basic_blocks_and_crossing_edges (edge *,
+static void find_rarely_executed_basic_blocks_and_crossing_edges (edge **,
int *,
int *);
static void add_labels_and_missing_jumps (edge *, int);
cache locality). */
static void
-find_rarely_executed_basic_blocks_and_crossing_edges (edge *crossing_edges,
+find_rarely_executed_basic_blocks_and_crossing_edges (edge **crossing_edges,
int *n_crossing_edges,
int *max_idx)
{
if (i == *max_idx)
{
*max_idx *= 2;
- crossing_edges = xrealloc (crossing_edges,
+ *crossing_edges = xrealloc (*crossing_edges,
(*max_idx) * sizeof (edge));
}
- crossing_edges[i++] = e;
+ (*crossing_edges)[i++] = e;
}
else
e->flags &= ~EDGE_CROSSING;
&& cur_bb->next_bb->index >= NUM_FIXED_BLOCKS)
cur_bb->aux = cur_bb->next_bb;
- find_rarely_executed_basic_blocks_and_crossing_edges (crossing_edges,
+ find_rarely_executed_basic_blocks_and_crossing_edges (&crossing_edges,
&n_crossing_edges,
&max_edges);
else
endp++;
}
+ free (nstore);
}
\f
/* Main program. */
block_stmt_iterator bsi;
basic_block bb_level_0;
struct matrix_info *mi = *slot;
- sbitmap visited = sbitmap_alloc (num_ssa_names);
+ sbitmap visited;
if (!mi->malloc_for_level)
return 1;
+
+ visited = sbitmap_alloc (num_ssa_names);
+
/* Do nothing if the current function is not the allocation
function of MI. */
if (mi->allocation_function_decl != current_function_decl
{
int e, e2;
int colors = 0;
- bool *is_dead = XNEWVEC (bool, OMEGA_MAX_GEQS);
+ bool *is_dead;
int found_something = 0;
for (e = 0; e < pb->num_geqs; e++)
if (colors < 2)
return;
+ is_dead = XNEWVEC (bool, OMEGA_MAX_GEQS);
+
for (e = 0; e < pb->num_geqs; e++)
is_dead[e] = false;
blocks = sbitmap_alloc (last_basic_block);
sbitmap_ones (blocks);
find_many_sub_basic_blocks (blocks);
+ sbitmap_free (blocks);
}
if (inserted)
}
if (name)
- new_vect_var = create_tmp_var (type, concat (prefix, name, NULL));
+ {
+ char* tmp = concat (prefix, name, NULL);
+ new_vect_var = create_tmp_var (type, tmp);
+ free (tmp);
+ }
else
new_vect_var = create_tmp_var (type, prefix);
corresponds the order of data-refs in RESULT_CHAIN. */
next_stmt = first_stmt;
gap_count = 1;
- for (i = 0; VEC_iterate(tree, result_chain, i, tmp_data_ref); i++)
+ for (i = 0; VEC_iterate (tree, result_chain, i, tmp_data_ref); i++)
{
if (!next_stmt)
break;