One of the code refactorings introducing phi node iterators modified the semantics...
authorAditya Kumar <aditya.k7@samsung.com>
Wed, 15 Jul 2015 21:37:07 +0000 (21:37 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Wed, 15 Jul 2015 21:37:07 +0000 (21:37 +0000)
One of the code refactorings introducing phi node iterators modified
the semantics of this code.  Revert that change to what was before.

        * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Point
        iterator to use_stmt.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r225851

gcc/ChangeLog
gcc/graphite-sese-to-poly.c

index 82ef7ecddcc6b36812c18a61697cc8ff22288a20..9c1e3cf8219589b0750cf73e3ad240ad64a5abf2 100644 (file)
@@ -1,3 +1,9 @@
+2015-07-15  Aditya Kumar  <aditya.k7@samsung.com>
+           Sebastian Pop  <s.pop@samsung.com>
+
+        * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Point
+       iterator to use_stmt.
+
 2015-07-15  Aditya Kumar  <aditya.k7@samsung.com>
            Sebastian Pop <s.pop@samsung.com>
 
index ffc948fd0b768f061bf0ade35ea013afbf2d5572..aaecab45e70d90378becfd46f1b136ae331621a6 100644 (file)
@@ -2441,10 +2441,10 @@ rewrite_cross_bb_scalar_deps (scop_p scop, gimple_stmt_iterator *gsi)
   handle_scalar_deps_crossing_scop_limits (scop, def, stmt);
 
   FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def)
-    if (gimple_code (use_stmt) == GIMPLE_PHI
-       && (res = true))
+    if (gphi *phi = dyn_cast <gphi *> (use_stmt))
       {
-       gphi_iterator psi = gsi_start_phis (gimple_bb (use_stmt));
+       res = true;
+       gphi_iterator psi = gsi_for_phi (phi);
 
        if (scalar_close_phi_node_p (gsi_stmt (psi)))
          rewrite_close_phi_out_of_ssa (scop, &psi);