Commit 9538c95b by Richard Biener Committed by Richard Biener

tree-ssa-loop-ch.c (pass_data_ch): Remove TODO_cleanup_cfg.

2015-03-18  Richard Biener  <rguenther@suse.de>

	* tree-ssa-loop-ch.c (pass_data_ch): Remove TODO_cleanup_cfg.
	(pass_ch::execute): Cleanup the CFG only if we did sth.
	* tree-vect-generic.c (pass_data_lower_vector): Remove TODO_cleanup_cfg.

From-SVN: r221487
parent 076701b6
2015-03-18 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-ch.c (pass_data_ch): Remove TODO_cleanup_cfg.
(pass_ch::execute): Cleanup the CFG only if we did sth.
* tree-vect-generic.c (pass_data_lower_vector): Remove TODO_cleanup_cfg.
2015-03-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2015-03-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* expmed.c (synth_mult): Use std::swap instead of manually * expmed.c (synth_mult): Use std::swap instead of manually
......
...@@ -159,7 +159,7 @@ const pass_data pass_data_ch = ...@@ -159,7 +159,7 @@ const pass_data pass_data_ch =
0, /* properties_provided */ 0, /* properties_provided */
0, /* properties_destroyed */ 0, /* properties_destroyed */
0, /* todo_flags_start */ 0, /* todo_flags_start */
TODO_cleanup_cfg, /* todo_flags_finish */ 0, /* todo_flags_finish */
}; };
class pass_ch : public gimple_opt_pass class pass_ch : public gimple_opt_pass
...@@ -184,6 +184,7 @@ pass_ch::execute (function *fun) ...@@ -184,6 +184,7 @@ pass_ch::execute (function *fun)
basic_block *bbs, *copied_bbs; basic_block *bbs, *copied_bbs;
unsigned n_bbs; unsigned n_bbs;
unsigned bbs_size; unsigned bbs_size;
bool changed = false;
loop_optimizer_init (LOOPS_HAVE_PREHEADERS loop_optimizer_init (LOOPS_HAVE_PREHEADERS
| LOOPS_HAVE_SIMPLE_LATCHES); | LOOPS_HAVE_SIMPLE_LATCHES);
...@@ -291,6 +292,8 @@ pass_ch::execute (function *fun) ...@@ -291,6 +292,8 @@ pass_ch::execute (function *fun)
are not now, since there was the loop exit condition. */ are not now, since there was the loop exit condition. */
split_edge (loop_preheader_edge (loop)); split_edge (loop_preheader_edge (loop));
split_edge (loop_latch_edge (loop)); split_edge (loop_latch_edge (loop));
changed = true;
} }
update_ssa (TODO_update_ssa); update_ssa (TODO_update_ssa);
...@@ -298,7 +301,7 @@ pass_ch::execute (function *fun) ...@@ -298,7 +301,7 @@ pass_ch::execute (function *fun)
free (copied_bbs); free (copied_bbs);
loop_optimizer_finalize (); loop_optimizer_finalize ();
return 0; return changed ? TODO_cleanup_cfg : 0;
} }
} // anon namespace } // anon namespace
......
...@@ -1740,8 +1740,7 @@ const pass_data pass_data_lower_vector = ...@@ -1740,8 +1740,7 @@ const pass_data pass_data_lower_vector =
PROP_gimple_lvec, /* properties_provided */ PROP_gimple_lvec, /* properties_provided */
0, /* properties_destroyed */ 0, /* properties_destroyed */
0, /* todo_flags_start */ 0, /* todo_flags_start */
( TODO_update_ssa TODO_update_ssa, /* todo_flags_finish */
| TODO_cleanup_cfg ), /* todo_flags_finish */
}; };
class pass_lower_vector : public gimple_opt_pass class pass_lower_vector : public gimple_opt_pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment