@@ -2990,7 +2990,7 @@ cleanup_cfg (int mode)
}
static unsigned int
-rest_of_handle_jump2 (void)
+execute_jump (void)
{
delete_trivially_dead_insns (get_insns (), max_reg_num ());
if (dump_file)
@@ -3000,22 +3000,47 @@ rest_of_handle_jump2 (void)
return 0;
}
+struct rtl_opt_pass pass_jump =
+{
+ {
+ RTL_PASS,
+ "jump", /* name */
+ NULL, /* gate */
+ execute_jump, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_JUMP, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ TODO_ggc_collect, /* todo_flags_start */
+ TODO_verify_rtl_sharing, /* todo_flags_finish */
+ }
+};
+
+static unsigned int
+execute_jump2 (void)
+{
+ cleanup_cfg (flag_crossjumping ? CLEANUP_CROSSJUMP : 0);
+ return 0;
+}
struct rtl_opt_pass pass_jump2 =
{
{
RTL_PASS,
- "jump", /* name */
- NULL, /* gate */
- rest_of_handle_jump2, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_JUMP, /* tv_id */
- 0, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- TODO_ggc_collect, /* todo_flags_start */
- TODO_verify_rtl_sharing, /* todo_flags_finish */
+ "jump2", /* name */
+ NULL, /* gate */
+ execute_jump2, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_JUMP, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ TODO_ggc_collect, /* todo_flags_start */
+ TODO_verify_rtl_sharing, /* todo_flags_finish */
}
};
@@ -626,26 +626,23 @@ combine_stack_adjustments_for_block (basic_block bb)
static bool
gate_handle_stack_adjustments (void)
{
- return flag_combine_stack_adjustments;
-}
-
-static unsigned int
-rest_of_handle_stack_adjustments (void)
-{
- cleanup_cfg (flag_crossjumping ? CLEANUP_CROSSJUMP : 0);
-
/* This is kind of a heuristic. We need to run combine_stack_adjustments
even for machines with possibly nonzero TARGET_RETURN_POPS_ARGS
and ACCUMULATE_OUTGOING_ARGS. We expect that only ports having
push instructions will have popping returns. */
#ifndef PUSH_ROUNDING
- if (!ACCUMULATE_OUTGOING_ARGS)
+ if (ACCUMULATE_OUTGOING_ARGS)
+ return false;
#endif
- {
- df_note_add_problem ();
- df_analyze ();
- combine_stack_adjustments ();
- }
+ return flag_combine_stack_adjustments;
+}
+
+static unsigned int
+rest_of_handle_stack_adjustments (void)
+{
+ df_note_add_problem ();
+ df_analyze ();
+ combine_stack_adjustments ();
return 0;
}
@@ -1515,7 +1515,7 @@ init_optimization_passes (void)
struct opt_pass **p = &pass_rest_of_compilation.pass.sub;
NEXT_PASS (pass_instantiate_virtual_regs);
NEXT_PASS (pass_into_cfg_layout_mode);
- NEXT_PASS (pass_jump2);
+ NEXT_PASS (pass_jump);
NEXT_PASS (pass_lower_subreg);
NEXT_PASS (pass_df_initialize_opt);
NEXT_PASS (pass_cse);
@@ -1577,6 +1577,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_thread_prologue_and_epilogue);
NEXT_PASS (pass_rtl_dse2);
NEXT_PASS (pass_stack_adjustments);
+ NEXT_PASS (pass_jump2);
NEXT_PASS (pass_peephole2);
NEXT_PASS (pass_if_after_reload);
NEXT_PASS (pass_regrename);
@@ -484,6 +484,7 @@ extern struct rtl_opt_pass pass_expand;
extern struct rtl_opt_pass pass_instantiate_virtual_regs;
extern struct rtl_opt_pass pass_rtl_fwprop;
extern struct rtl_opt_pass pass_rtl_fwprop_addr;
+extern struct rtl_opt_pass pass_jump;
extern struct rtl_opt_pass pass_jump2;
extern struct rtl_opt_pass pass_lower_subreg;
extern struct rtl_opt_pass pass_cse;