OSDN Git Service

Fix PRs 46834, 46994, and 46995: only rewrite reductions not containing other computa...
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 8 Feb 2011 16:53:57 +0000 (16:53 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 8 Feb 2011 16:53:57 +0000 (16:53 +0000)
commit2528d7cf980f229190d35fc072017eea7215b6cb
tree9d8e10243d26f0ff63a20c95b951b717d1c95917
parent033f9c67d26ccf1be5cc4f4f816450d75e110082
Fix PRs 46834, 46994, and 46995: only rewrite reductions not containing other computations.

2011-02-08  Sebastian Pop  <sebastian.pop@amd.com>

PR tree-optimization/46834
PR tree-optimization/46994
PR tree-optimization/46995
* graphite-sese-to-poly.c (used_outside_reduction): New.
(detect_commutative_reduction): Call used_outside_reduction.
(rewrite_commutative_reductions_out_of_ssa_close_phi): Call
translate_scalar_reduction_to_array only when at least one
loop-phi/close-phi tuple has been detected.

* gcc.dg/graphite/id-pr46834.c: New.
* gfortran.dg/graphite/id-pr46994.f90: New.
* gfortran.dg/graphite/id-pr46995.f90: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169928 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/graphite-sese-to-poly.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/id-pr46834.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/id-pr46994.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/id-pr46995.f90 [new file with mode: 0644]