]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Merge branch 'releases/gcc-12' into devel/omp/gcc-12
authorTobias Burnus <tobias@codesourcery.com>
Mon, 12 Dec 2022 12:20:32 +0000 (13:20 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 12 Dec 2022 12:20:32 +0000 (13:20 +0100)
Merge up to r12-8979-g1a8af012222a8386fcda16a61dc17f11ba9cfbfd (12th Dec 2022)

1  2 
gcc/tree-cfg.cc
gcc/tree-ssa-loop-im.cc

diff --cc gcc/tree-cfg.cc
Simple merge
index 3e09bb19ed30c3e6d3e2f711e02946d8bc258c38,3926e5c14a4b4ac72edbe4de400268f8f9e14017..99d0a0194daf72fce700dfc3e8d944a66dbd96a0
@@@ -46,9 -46,8 +46,10 @@@ along with GCC; see the file COPYING3
  #include "alias.h"
  #include "builtins.h"
  #include "tree-dfa.h"
+ #include "tree-ssa.h"
  #include "dbgcnt.h"
 +#include "graphite-oacc.h"
 +#include "internal-fn.h"
  
  /* TODO:  Support for predicated code motion.  I.e.
  
@@@ -333,8 -332,8 +334,8 @@@ enum move_po
     because it may trap), return MOVE_PRESERVE_EXECUTION.
     Otherwise return MOVE_IMPOSSIBLE.  */
  
- enum move_pos
- movement_possibility (gimple *stmt, bool restrict_oacc_hoisting)
+ static enum move_pos
 -movement_possibility_1 (gimple *stmt)
++movement_possibility_1 (gimple *stmt, bool restrict_oacc_hoisting)
  {
    tree lhs;
    enum move_pos ret = MOVE_POSSIBLE;
    return ret;
  }
  
 -movement_possibility (gimple *stmt)
+ static enum move_pos
 -  enum move_pos pos = movement_possibility_1 (stmt);
++movement_possibility (gimple *stmt, bool restrict_oacc_hoisting)
+ {
++  enum move_pos pos = movement_possibility_1 (stmt, restrict_oacc_hoisting);
+   if (pos == MOVE_POSSIBLE)
+     {
+       use_operand_p use_p;
+       ssa_op_iter ssa_iter;
+       FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, ssa_iter, SSA_OP_USE)
+       if (TREE_CODE (USE_FROM_PTR (use_p)) == SSA_NAME
+           && ssa_name_maybe_undef_p (USE_FROM_PTR (use_p)))
+         return MOVE_PRESERVE_EXECUTION;
+     }
+   return pos;
+ }
  /* Compare the profile count inequality of bb and loop's preheader, it is
     three-state as stated in profile-count.h, FALSE is returned if inequality
     cannot be decided.  */