static void rest_of_handle_sched (tree, rtx);
static void rest_of_handle_sched2 (tree, rtx);
#endif
-static bool rest_of_handle_new_regalloc (tree, rtx, int *);
-static bool rest_of_handle_old_regalloc (tree, rtx, int *);
+static bool rest_of_handle_new_regalloc (tree, rtx);
+static bool rest_of_handle_old_regalloc (tree, rtx);
static void rest_of_handle_regrename (tree, rtx);
static void rest_of_handle_reorder_blocks (tree, rtx);
#ifdef STACK_REGS
/* Run new register allocator. Return TRUE if we must exit
rest_of_compilation upon return. */
static bool
-rest_of_handle_new_regalloc (tree decl, rtx insns, int *rebuild_notes)
+rest_of_handle_new_regalloc (tree decl, rtx insns)
{
int failure;
return true;
reload_completed = 1;
- *rebuild_notes = 0;
return false;
}
/* Run old register allocator. Return TRUE if we must exit
rest_of_compilation upon return. */
static bool
-rest_of_handle_old_regalloc (tree decl, rtx insns, int *rebuild_notes)
+rest_of_handle_old_regalloc (tree decl, rtx insns)
{
int failure;
+ int rebuild_notes;
/* Allocate the reg_renumber array. */
allocate_reg_info (max_regno, FALSE, TRUE);
allocate_initial_values (reg_equiv_memory_loc);
regclass (insns, max_reg_num (), rtl_dump_file);
- *rebuild_notes = local_alloc ();
+ rebuild_notes = local_alloc ();
timevar_pop (TV_LOCAL_ALLOC);
+ /* Local allocation may have turned an indirect jump into a direct
+ jump. If so, we must rebuild the JUMP_LABEL fields of jumping
+ instructions. */
+ if (rebuild_notes)
+ {
+ timevar_push (TV_JUMP);
+
+ rebuild_jump_labels (insns);
+ purge_all_dead_edges (0);
+
+ timevar_pop (TV_JUMP);
+ }
+
if (dump_file[DFI_lreg].enabled)
{
timevar_push (TV_DUMP);
rest_of_compilation (tree decl)
{
rtx insns;
- int rebuild_label_notes_after_reload;
timevar_push (TV_REST_OF_COMPILATION);
if (flag_new_regalloc)
{
- if (rest_of_handle_new_regalloc (decl, insns,
- &rebuild_label_notes_after_reload))
+ if (rest_of_handle_new_regalloc (decl, insns))
goto exit_rest_of_compilation;
}
else
{
- if (rest_of_handle_old_regalloc (decl, insns,
- &rebuild_label_notes_after_reload))
+ if (rest_of_handle_old_regalloc (decl, insns))
goto exit_rest_of_compilation;
}
timevar_pop (TV_RELOAD_CSE_REGS);
}
- /* Register allocation and reloading may have turned an indirect jump into
- a direct jump. If so, we must rebuild the JUMP_LABEL fields of
- jumping instructions. */
- if (rebuild_label_notes_after_reload)
- {
- timevar_push (TV_JUMP);
-
- rebuild_jump_labels (insns);
- purge_all_dead_edges (0);
-
- timevar_pop (TV_JUMP);
- }
-
close_dump_file (DFI_postreload, print_rtl_with_bb, insns);
/* Re-create the death notes which were deleted during reload. */