gimple-fold.c (gimple_fold_call): Use gimple_call_noreturn_p instead of testing ECF_N...
authorJakub Jelinek <jakub@redhat.com>
Wed, 17 Aug 2016 14:24:53 +0000 (16:24 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 17 Aug 2016 14:24:53 +0000 (16:24 +0200)
* 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

gcc/ChangeLog
gcc/gimple-fold.c
gcc/gimple-low.c
gcc/predict.c
gcc/tree-cfg.c

index 9bb3824437b08495e76a2e585f96a6611847aa46..8c27eae13d785bf74128b74eb8380c54b6a85a8b 100644 (file)
@@ -1,5 +1,11 @@
 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
index 73c231445fbf2c60c38708b64c3aae689d52eb8c..fbbe52004aa8e129940e6a7b4e56918d5f06e287 100644 (file)
@@ -3184,7 +3184,7 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)
                  /* 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)))
index 9ea17af6637508a028e830d97a3c5ec2436bb9dd..5f3361acba8dd294627dc3c4dd47242e08236182 100644 (file)
@@ -610,7 +610,7 @@ gimple_stmt_may_fallthru (gimple *stmt)
 
     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;
index c1dbb96b8c5031ed042047de10548c13e61e3185..035a0c2e7d63e1487d7f396560fe8371af6677ba 100644 (file)
@@ -2639,8 +2639,7 @@ tree_bb_level_predictions (void)
 
          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);
index 4e55a83d38accc6c64e65e828b4da7839d96b4e3..57c84108a5c5b9561e6344bb905da0e7230c020e 100644 (file)
@@ -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.  */
       else
-       fallthru = !(gimple_call_flags (last) & ECF_NORETURN);
+       fallthru = !gimple_call_noreturn_p (last);
       break;
 
     case GIMPLE_ASSIGN:
@@ -9083,7 +9083,7 @@ execute_fixup_cfg (void)
          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);