mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
15bdf5be1a
commit
cd1d802aed
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2016-06-08 Alan Hayward <alan.hayward@arm.com>
|
||||||
|
|
||||||
* tree-vect-data-refs.c (vect_analyze_data_refs): Remove debug newline.
|
* 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;
|
basic_block bb;
|
||||||
gimple *ass_stmt;
|
gimple *ass_stmt;
|
||||||
tree var;
|
tree var;
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
FOR_EACH_BB_FN (bb, fun)
|
FOR_EACH_BB_FN (bb, fun)
|
||||||
{
|
{
|
||||||
|
|
@ -3177,6 +3178,7 @@ pass_strip_predict_hints::execute (function *fun)
|
||||||
if (gimple_code (stmt) == GIMPLE_PREDICT)
|
if (gimple_code (stmt) == GIMPLE_PREDICT)
|
||||||
{
|
{
|
||||||
gsi_remove (&bi, true);
|
gsi_remove (&bi, true);
|
||||||
|
changed = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (is_gimple_call (stmt))
|
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))
|
&& gimple_call_internal_fn (stmt) == IFN_BUILTIN_EXPECT))
|
||||||
{
|
{
|
||||||
var = gimple_call_lhs (stmt);
|
var = gimple_call_lhs (stmt);
|
||||||
|
changed = true;
|
||||||
if (var)
|
if (var)
|
||||||
{
|
{
|
||||||
ass_stmt
|
ass_stmt
|
||||||
|
|
@ -3207,7 +3210,7 @@ pass_strip_predict_hints::execute (function *fun)
|
||||||
gsi_next (&bi);
|
gsi_next (&bi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return changed ? TODO_cleanup_cfg : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anon namespace
|
} // anon namespace
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue