re PR c++/53602 (Libre Office causes an internal compiler error)

PR c++/53602
        * cfgcleanup.c (execute_jump): Rename from rest_of_handle_jump2.
        (pass_jump): Rename from pass_jump2.
        (execute_jump2, pass_jump2): New.
        * combine-stack-adj.c (rest_of_handle_stack_adjustments): Don't
        perform cfg cleanup here.  Move the test of PUSH_ROUNDING
        and ACCUMULATE_OUTGOING_ARGS test...
        (gate_handle_stack_adjustments): ... here.
        * passes.c (init_optimization_passes): Update for pass_jump2 rename.
        Place new pass_jump2 after pass_stack_adjustments.
        * tree-pass.h (pass_jump): Declare.

From-SVN: r188360
This commit is contained in:
Richard Henderson 2012-06-09 09:27:52 -07:00 committed by Richard Henderson
parent aef2b1d1f0
commit 11a687e750
5 changed files with 66 additions and 28 deletions

View File

@ -1,3 +1,17 @@
2012-06-09 Richard Henderson <rth@redhat.com>
PR c++/53602
* cfgcleanup.c (execute_jump): Rename from rest_of_handle_jump2.
(pass_jump): Rename from pass_jump2.
(execute_jump2, pass_jump2): New.
* combine-stack-adj.c (rest_of_handle_stack_adjustments): Don't
perform cfg cleanup here. Move the test of PUSH_ROUNDING
and ACCUMULATE_OUTGOING_ARGS test...
(gate_handle_stack_adjustments): ... here.
* passes.c (init_optimization_passes): Update for pass_jump2 rename.
Place new pass_jump2 after pass_stack_adjustments.
* tree-pass.h (pass_jump): Declare.
2012-06-09 Kenneth Zadeck <zadeck@naturalbridge.com>
* simplify-rtx.c (simplify_const_binary_operation): Fixed shift

View File

@ -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 */
}
};

View File

@ -626,26 +626,23 @@ combine_stack_adjustments_for_block (basic_block bb)
static bool
gate_handle_stack_adjustments (void)
{
/* 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)
return false;
#endif
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)
#endif
{
df_note_add_problem ();
df_analyze ();
combine_stack_adjustments ();
}
df_note_add_problem ();
df_analyze ();
combine_stack_adjustments ();
return 0;
}

View File

@ -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);

View File

@ -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;