diff options
author | mueller <mueller@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-15 11:45:30 +0000 |
---|---|---|
committer | mueller <mueller@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-15 11:45:30 +0000 |
commit | 5a30047cc1166eb6ec0def314673f9535c5d44b7 (patch) | |
tree | ee710b19d6216c4dec1c96e78150fde55e460e43 /gcc/bb-reorder.c | |
parent | 4f24072606b69a8fbb28eb194bb7c79a5f3abb1c (diff) | |
download | gcc-5a30047cc1166eb6ec0def314673f9535c5d44b7.tar.gz |
2007-07-15 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126653 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r-- | gcc/bb-reorder.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index dd6d30e4875..4be0d80bbd3 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -180,7 +180,7 @@ static void connect_traces (int, struct trace *); 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); @@ -1219,7 +1219,7 @@ get_uncond_jump_length (void) 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) { @@ -1256,10 +1256,10 @@ find_rarely_executed_basic_blocks_and_crossing_edges (edge *crossing_edges, 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; @@ -2168,7 +2168,7 @@ partition_hot_cold_basic_blocks (void) && 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); |