diff options
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r-- | gcc/bb-reorder.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index d054ffd9201..59622ea4d7b 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -2031,7 +2031,7 @@ duplicate_computed_gotos (void) uncond_jump_length = get_uncond_jump_length (); max_size = uncond_jump_length * PARAM_VALUE (PARAM_MAX_GOTO_DUPLICATION_INSNS); - candidates = BITMAP_XMALLOC (); + candidates = BITMAP_ALLOC (NULL); /* Build the reorder chain for the original order of blocks. Look for a computed jump while we are at it. */ @@ -2048,14 +2048,15 @@ duplicate_computed_gotos (void) int size = 0; FOR_BB_INSNS (bb, insn) - { - if (INSN_P (insn)) - size += get_attr_length (insn); - if (size > max_size) - break; - } + if (INSN_P (insn)) + { + size += get_attr_length (insn); + if (size > max_size) + break; + } - if (size <= max_size) + if (size <= max_size + && can_duplicate_block_p (bb)) bitmap_set_bit (candidates, bb->index); } } @@ -2094,7 +2095,7 @@ duplicate_computed_gotos (void) done: cfg_layout_finalize (); - BITMAP_XFREE (candidates); + BITMAP_FREE (candidates); timevar_pop (TV_REORDER_BLOCKS); } |