Commit cd1d802a by Jan Hubicka Committed by Jan Hubicka

predict.c (pass_strip_predict_hints::execute): Cleanup CFG if some statements was removed.


	* predict.c (pass_strip_predict_hints::execute): Cleanup CFG if
	some statements was removed.

From-SVN: r237199
parent 15bdf5be
2016-06-07 Jan Hubicka <hubicka@ucw.cz>
* predict.c (pass_strip_predict_hints::execute): Cleanup CFG if
some statements was removed.
2016-06-08 Alan Hayward <alan.hayward@arm.com>
* tree-vect-data-refs.c (vect_analyze_data_refs): Remove debug newline.
......
......@@ -3166,6 +3166,7 @@ pass_strip_predict_hints::execute (function *fun)
basic_block bb;
gimple *ass_stmt;
tree var;
bool changed = false;
FOR_EACH_BB_FN (bb, fun)
{
......@@ -3177,6 +3178,7 @@ pass_strip_predict_hints::execute (function *fun)
if (gimple_code (stmt) == GIMPLE_PREDICT)
{
gsi_remove (&bi, true);
changed = true;
continue;
}
else if (is_gimple_call (stmt))
......@@ -3191,6 +3193,7 @@ pass_strip_predict_hints::execute (function *fun)
&& gimple_call_internal_fn (stmt) == IFN_BUILTIN_EXPECT))
{
var = gimple_call_lhs (stmt);
changed = true;
if (var)
{
ass_stmt
......@@ -3207,7 +3210,7 @@ pass_strip_predict_hints::execute (function *fun)
gsi_next (&bi);
}
}
return 0;
return changed ? TODO_cleanup_cfg : 0;
}
} // anon namespace
......
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