diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-01 05:50:51 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-01 05:50:51 +0000 |
commit | e49e8bd540832217538f9720f502da8c20f1f9b0 (patch) | |
tree | 8f6bc6f898cfafd809ea3bf6f2a7660a896f9a40 /gcc/bb-reorder.c | |
parent | b528597c9f3f2e3a64a664c7be6c82a7c2688287 (diff) | |
download | gcc-e49e8bd540832217538f9720f502da8c20f1f9b0.tar.gz |
2008-07-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r137307
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137309 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r-- | gcc/bb-reorder.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index a3fd3feb6c7..b36c6c24bb3 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -278,7 +278,7 @@ find_traces (int *n_traces, struct trace *traces) basic_block bb; fprintf (dump_file, "Trace %d (round %d): ", i + 1, traces[i].round + 1); - for (bb = traces[i].first; bb != traces[i].last; bb = bb->aux) + for (bb = traces[i].first; bb != traces[i].last; bb = (basic_block) bb->aux) fprintf (dump_file, "%d [%d] ", bb->index, bb->frequency); fprintf (dump_file, "%d [%d]\n", bb->index, bb->frequency); } @@ -358,7 +358,7 @@ rotate_loop (edge back_edge, struct trace *trace, int trace_n) } } } - bb = bb->aux; + bb = (basic_block) bb->aux; } while (bb != back_edge->dest); @@ -368,7 +368,7 @@ rotate_loop (edge back_edge, struct trace *trace, int trace_n) the trace. */ if (back_edge->dest == trace->first) { - trace->first = best_bb->aux; + trace->first = (basic_block) best_bb->aux; } else { @@ -376,7 +376,7 @@ rotate_loop (edge back_edge, struct trace *trace, int trace_n) for (prev_bb = trace->first; prev_bb->aux != back_edge->dest; - prev_bb = prev_bb->aux) + prev_bb = (basic_block) prev_bb->aux) ; prev_bb->aux = best_bb->aux; @@ -442,7 +442,7 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, fibheapkey_t key; edge_iterator ei; - bb = fibheap_extract_min (*heap); + bb = (basic_block) fibheap_extract_min (*heap); bbd[bb->index].heap = NULL; bbd[bb->index].node = NULL; @@ -780,7 +780,7 @@ copy_bb (basic_block old_bb, edge e, basic_block bb, int trace) new_size = MAX (last_basic_block, new_bb->index + 1); new_size = GET_ARRAY_SIZE (new_size); - bbd = xrealloc (bbd, new_size * sizeof (bbro_basic_block_data)); + bbd = XRESIZEVEC (bbro_basic_block_data, bbd, new_size); for (i = array_size; i < new_size; i++) { bbd[i].start_of_trace = -1; @@ -1143,7 +1143,7 @@ connect_traces (int n_traces, struct trace *traces) basic_block bb; fprintf (dump_file, "Final order:\n"); - for (bb = traces[0].first; bb; bb = bb->aux) + for (bb = traces[0].first; bb; bb = (basic_block) bb->aux) fprintf (dump_file, "%d ", bb->index); fprintf (dump_file, "\n"); fflush (dump_file); @@ -1251,8 +1251,7 @@ find_rarely_executed_basic_blocks_and_crossing_edges (edge **crossing_edges, if (i == *max_idx) { *max_idx *= 2; - *crossing_edges = xrealloc (*crossing_edges, - (*max_idx) * sizeof (edge)); + *crossing_edges = XRESIZEVEC (edge, *crossing_edges, *max_idx); } (*crossing_edges)[i++] = e; } |