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
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): If
turning a call into __builtin_unreachable-like noreturn call, adjust
/* If changing the call to __cxa_pure_virtual
or similar noreturn function, adjust gimple_call_fntype
too. */
- if ((gimple_call_flags (stmt) & ECF_NORETURN)
+ if (gimple_call_noreturn_p (stmt)
&& VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl)))
&& TYPE_ARG_TYPES (TREE_TYPE (fndecl))
&& (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (fndecl)))
case GIMPLE_CALL:
/* Functions that do not return do not fall through. */
- return (gimple_call_flags (stmt) & ECF_NORETURN) == 0;
+ return !gimple_call_noreturn_p (stmt);
default:
return true;
if (is_gimple_call (stmt))
{
- if ((gimple_call_flags (stmt) & ECF_NORETURN)
- && has_return_edges)
+ if (gimple_call_noreturn_p (stmt) && has_return_edges)
predict_paths_leading_to (bb, PRED_NORETURN,
NOT_TAKEN);
decl = gimple_call_fndecl (stmt);
}
/* Some calls are known not to return. */
else
- fallthru = !(gimple_call_flags (last) & ECF_NORETURN);
+ fallthru = !gimple_call_noreturn_p (last);
break;
case GIMPLE_ASSIGN:
if (!stmt
|| (!is_ctrl_stmt (stmt)
&& (!is_gimple_call (stmt)
- || (gimple_call_flags (stmt) & ECF_NORETURN) == 0)))
+ || !gimple_call_noreturn_p (stmt))))
{
if (stmt && is_gimple_call (stmt))
gimple_call_set_ctrl_altering (stmt, false);