summaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-09 16:27:52 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-09 16:27:52 +0000
commit76cdbc6dbde94274be90528820f1c09b0ef11110 (patch)
tree55f5584472a05a0e58bdd1b98b62d88b9b689b18 /gcc/cfgcleanup.c
parent86018455de0f34b448969462e504137c4e0990cb (diff)
downloadgcc-76cdbc6dbde94274be90528820f1c09b0ef11110.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188360 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c51
1 files changed, 38 insertions, 13 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 619b274e46a..1aa4cbb7eae 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -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 */
}
};