Do not rewrite out of SSA scalar phi nodes that can be scev_analyzable_p.
2010-07-15 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of SSA scalar phi nodes that can be scev_analyzable_p. * gfortran.dg/graphite/id-20.f: Adjust testcase. From-SVN: r163148
This commit is contained in:
parent
3dd2dd5736
commit
87b28340fd
|
@ -1,3 +1,8 @@
|
||||||
|
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
|
* graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
|
||||||
|
SSA scalar phi nodes that can be scev_analyzable_p.
|
||||||
|
|
||||||
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
|
* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
|
* graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
|
||||||
|
SSA scalar phi nodes that can be scev_analyzable_p.
|
||||||
|
|
||||||
|
* gfortran.dg/graphite/id-20.f: Adjust testcase.
|
||||||
|
|
||||||
2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
|
2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
|
* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
|
||||||
|
|
|
@ -165,8 +165,6 @@ static bool
|
||||||
reduction_phi_p (sese region, gimple_stmt_iterator *psi)
|
reduction_phi_p (sese region, gimple_stmt_iterator *psi)
|
||||||
{
|
{
|
||||||
loop_p loop;
|
loop_p loop;
|
||||||
tree scev;
|
|
||||||
affine_iv iv;
|
|
||||||
gimple phi = gsi_stmt (*psi);
|
gimple phi = gsi_stmt (*psi);
|
||||||
tree res = gimple_phi_result (phi);
|
tree res = gimple_phi_result (phi);
|
||||||
|
|
||||||
|
@ -189,11 +187,11 @@ reduction_phi_p (sese region, gimple_stmt_iterator *psi)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Main induction variables with constant strides in LOOP are not
|
if (scev_analyzable_p (res, region))
|
||||||
reductions. */
|
|
||||||
if (simple_iv (loop, loop, res, &iv, true))
|
|
||||||
{
|
{
|
||||||
if (integer_zerop (iv.step))
|
tree scev = scalar_evolution_in_region (region, loop, res);
|
||||||
|
|
||||||
|
if (evolution_function_is_invariant_p (scev, loop->num))
|
||||||
remove_invariant_phi (region, psi);
|
remove_invariant_phi (region, psi);
|
||||||
else
|
else
|
||||||
gsi_next (psi);
|
gsi_next (psi);
|
||||||
|
@ -201,16 +199,6 @@ reduction_phi_p (sese region, gimple_stmt_iterator *psi)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
scev = scalar_evolution_in_region (region, loop, res);
|
|
||||||
if (chrec_contains_undetermined (scev))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (evolution_function_is_invariant_p (scev, loop->num))
|
|
||||||
{
|
|
||||||
remove_invariant_phi (region, psi);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* All the other cases are considered reductions. */
|
/* All the other cases are considered reductions. */
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
|
* gfortran.dg/graphite/id-20.f: Adjust testcase.
|
||||||
|
|
||||||
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
* gcc.dg/graphite/pr42729.c: New.
|
* gcc.dg/graphite/pr42729.c: New.
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
DO 32 MB=1,NVIRA
|
! { dg-options "-O3 -ffast-math" }
|
||||||
* PVIRA(MA,MB)*(EA(MA+NOA)+EA(MB+NOA))*PT5
|
|
||||||
32 CONTINUE
|
DIMENSION FPQR(25,25,25)
|
||||||
|
INTEGER P,Q,R
|
||||||
|
DO 130 R=1,N4MAX,2
|
||||||
|
IF(P.GT.1) THEN
|
||||||
|
FPQR(P,Q,R)= RM2*FPQR(P,Q,R-2)*REC(P+Q+R-2)
|
||||||
|
END IF
|
||||||
|
130 RM2= RM2+TWO
|
||||||
END
|
END
|
||||||
|
|
Loading…
Reference in New Issue