summaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index dc17aa6dd7f..73c759705a2 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -911,7 +911,7 @@ connect_traces (int n_traces, struct trace *traces)
else
count_threshold = max_entry_count / 1000 * DUPLICATION_THRESHOLD;
- connected = xcalloc (n_traces, sizeof (bool));
+ connected = XCNEWVEC (bool, n_traces);
last_trace = -1;
current_pass = 1;
current_partition = BB_PARTITION (traces[0].first);
@@ -1912,7 +1912,7 @@ reorder_basic_blocks (unsigned int flags)
/* We need to know some information for each basic block. */
array_size = GET_ARRAY_SIZE (last_basic_block);
- bbd = xmalloc (array_size * sizeof (bbro_basic_block_data));
+ bbd = XNEWVEC (bbro_basic_block_data, array_size);
for (i = 0; i < array_size; i++)
{
bbd[i].start_of_trace = -1;
@@ -1922,7 +1922,7 @@ reorder_basic_blocks (unsigned int flags)
bbd[i].node = NULL;
}
- traces = xmalloc (n_basic_blocks * sizeof (struct trace));
+ traces = XNEWVEC (struct trace, n_basic_blocks);
n_traces = 0;
find_traces (&n_traces, traces);
connect_traces (n_traces, traces);
@@ -2172,7 +2172,7 @@ partition_hot_cold_basic_blocks (void)
if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1)
return;
- crossing_edges = xcalloc (max_edges, sizeof (edge));
+ crossing_edges = XCNEWVEC (edge, max_edges);
cfg_layout_initialize (0);