------- Comment #19 from dominiq at lps dot ens dot fr  2010-08-10 12:00 -------
(In reply to comment #18)
> Although it is probably better set the stride during resolution.

Probably.

A few comments before leaving for ten days without access to the net.

(1) I think all the changes done recently to avoid unneeded temporaries can be
extended by reversing the loops.

(2) The following code generates an unneeded temporary:

integer, parameter :: n = 10
integer :: i
integer :: a(0:n+1) = (/(i, i =0, n), 0/)
a(:6:2) = a(::3)
print *, a
end

It is in the class abs(r_stride)>max(0,abs(l_stride)) for which there is no
need for temporary if
l_start<r_start+r_stride for r_stride>max(0,l_stride)
or
l_start>r_start+r_stride for r_stride<min(0,l_stride)

If I am not mistaken, this is the last case for which one can conclude for any
size of the sections.
(I have done the proof on the back of an envelope that I cannot find right
now.) For all the remaining cases it exists some set of triplets for which
there is a dependency even if for some others there is none (depending upon the
dependent indices are inside or not of the actual range). Although this can be
implemented, I seriously doubt it is worth the pain.

(3) I think the coverage for missing temporaries is rather limited right now
and I am planning to write some torture test(s) to improve this situation.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45159

Reply via email to