]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/gimple-ssa-split-paths.c
Update copyright years.
[thirdparty/gcc.git] / gcc / gimple-ssa-split-paths.c
index 75f6be8f1cf9871b4bd3448147fd6d1dcff9d24b..1a56868f6a36e4053eafa30bf6d53035011221df 100644 (file)
@@ -1,5 +1,5 @@
 /* Support routines for Splitting Paths to loop backedges
-   Copyright (C) 2015-2018 Free Software Foundation, Inc.
+   Copyright (C) 2015-2020 Free Software Foundation, Inc.
    Contributed by Ajit Kumar Agarwal <ajitkum@xilinx.com>.
 
  This file is part of GCC.
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple-iterator.h"
 #include "tracer.h"
 #include "predict.h"
-#include "params.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
@@ -264,8 +263,12 @@ is_feasible_trace (basic_block bb)
          if (is_gimple_debug (stmt))
            continue;
          /* If there's a use in the joiner this might be a CSE/DCE
-            opportunity.  */
-         if (gimple_bb (stmt) == bb)
+            opportunity, but not if the use is in a conditional
+            which makes this a likely if-conversion candidate.  */
+         if (gimple_bb (stmt) == bb
+             && (!is_gimple_assign (stmt)
+                 || (TREE_CODE_CLASS (gimple_assign_rhs_code (stmt))
+                     != tcc_comparison)))
            {
              found_useful_phi = true;
              break;
@@ -362,7 +365,7 @@ is_feasible_trace (basic_block bb)
 
   /* Upper Hard limit on the number statements to copy.  */
   if (num_stmts_in_join
-      >= PARAM_VALUE (PARAM_MAX_JUMP_THREAD_DUPLICATION_STMTS))
+      >= param_max_jump_thread_duplication_stmts)
     return false;
 
   return true;