From: spop Date: Wed, 15 Jul 2015 21:37:07 +0000 (+0000) Subject: One of the code refactorings introducing phi node iterators modified X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85434c26a968b557c452b568762e432dd3fdf66c;p=thirdparty%2Fgcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225851 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82ef7ecddcc6..9c1e3cf82195 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-15 Aditya Kumar + Sebastian Pop + + * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Point + iterator to use_stmt. + 2015-07-15 Aditya Kumar Sebastian Pop diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index ffc948fd0b76..aaecab45e70d 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -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 (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);