mirror of git://gcc.gnu.org/git/gcc.git
gimple-fold.c (gimple_fold_call): Use gimple_call_noreturn_p instead of testing ECF_NORETURN bit in gimple_call_flags.
* gimple-fold.c (gimple_fold_call): Use gimple_call_noreturn_p instead of testing ECF_NORETURN bit in gimple_call_flags. * tree-cfg.c (make_edges_bb, execute_fixup_cfg): Likewise. * predict.c (tree_bb_level_predictions): Likewise. * gimple-low.c (gimple_stmt_may_fallthru): Likewise. From-SVN: r239539
This commit is contained in:
parent
e07f4b008d
commit
865f704603
|
|
@ -1,5 +1,11 @@
|
||||||
2016-08-17 Jakub Jelinek <jakub@redhat.com>
|
2016-08-17 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* gimple-fold.c (gimple_fold_call): Use gimple_call_noreturn_p
|
||||||
|
instead of testing ECF_NORETURN bit in gimple_call_flags.
|
||||||
|
* tree-cfg.c (make_edges_bb, execute_fixup_cfg): Likewise.
|
||||||
|
* predict.c (tree_bb_level_predictions): Likewise.
|
||||||
|
* gimple-low.c (gimple_stmt_may_fallthru): Likewise.
|
||||||
|
|
||||||
PR middle-end/77259
|
PR middle-end/77259
|
||||||
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): If
|
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): If
|
||||||
turning a call into __builtin_unreachable-like noreturn call, adjust
|
turning a call into __builtin_unreachable-like noreturn call, adjust
|
||||||
|
|
|
||||||
|
|
@ -3184,7 +3184,7 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)
|
||||||
/* If changing the call to __cxa_pure_virtual
|
/* If changing the call to __cxa_pure_virtual
|
||||||
or similar noreturn function, adjust gimple_call_fntype
|
or similar noreturn function, adjust gimple_call_fntype
|
||||||
too. */
|
too. */
|
||||||
if ((gimple_call_flags (stmt) & ECF_NORETURN)
|
if (gimple_call_noreturn_p (stmt)
|
||||||
&& VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl)))
|
&& VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl)))
|
||||||
&& TYPE_ARG_TYPES (TREE_TYPE (fndecl))
|
&& TYPE_ARG_TYPES (TREE_TYPE (fndecl))
|
||||||
&& (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (fndecl)))
|
&& (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (fndecl)))
|
||||||
|
|
|
||||||
|
|
@ -610,7 +610,7 @@ gimple_stmt_may_fallthru (gimple *stmt)
|
||||||
|
|
||||||
case GIMPLE_CALL:
|
case GIMPLE_CALL:
|
||||||
/* Functions that do not return do not fall through. */
|
/* Functions that do not return do not fall through. */
|
||||||
return (gimple_call_flags (stmt) & ECF_NORETURN) == 0;
|
return !gimple_call_noreturn_p (stmt);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -2639,8 +2639,7 @@ tree_bb_level_predictions (void)
|
||||||
|
|
||||||
if (is_gimple_call (stmt))
|
if (is_gimple_call (stmt))
|
||||||
{
|
{
|
||||||
if ((gimple_call_flags (stmt) & ECF_NORETURN)
|
if (gimple_call_noreturn_p (stmt) && has_return_edges)
|
||||||
&& has_return_edges)
|
|
||||||
predict_paths_leading_to (bb, PRED_NORETURN,
|
predict_paths_leading_to (bb, PRED_NORETURN,
|
||||||
NOT_TAKEN);
|
NOT_TAKEN);
|
||||||
decl = gimple_call_fndecl (stmt);
|
decl = gimple_call_fndecl (stmt);
|
||||||
|
|
|
||||||
|
|
@ -807,7 +807,7 @@ make_edges_bb (basic_block bb, struct omp_region **pcur_region, int *pomp_index)
|
||||||
}
|
}
|
||||||
/* Some calls are known not to return. */
|
/* Some calls are known not to return. */
|
||||||
else
|
else
|
||||||
fallthru = !(gimple_call_flags (last) & ECF_NORETURN);
|
fallthru = !gimple_call_noreturn_p (last);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMPLE_ASSIGN:
|
case GIMPLE_ASSIGN:
|
||||||
|
|
@ -9083,7 +9083,7 @@ execute_fixup_cfg (void)
|
||||||
if (!stmt
|
if (!stmt
|
||||||
|| (!is_ctrl_stmt (stmt)
|
|| (!is_ctrl_stmt (stmt)
|
||||||
&& (!is_gimple_call (stmt)
|
&& (!is_gimple_call (stmt)
|
||||||
|| (gimple_call_flags (stmt) & ECF_NORETURN) == 0)))
|
|| !gimple_call_noreturn_p (stmt))))
|
||||||
{
|
{
|
||||||
if (stmt && is_gimple_call (stmt))
|
if (stmt && is_gimple_call (stmt))
|
||||||
gimple_call_set_ctrl_altering (stmt, false);
|
gimple_call_set_ctrl_altering (stmt, false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue