This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33113] Failing to represent the stride (with array) of a dataref when it is not a constant
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2007 20:08:41 -0000
- Subject: [Bug tree-optimization/33113] Failing to represent the stride (with array) of a dataref when it is not a constant
- References: <bug-33113-6954@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rakdver at gcc dot gnu dot org 2007-08-19 20:08 -------
(In reply to comment #0)
> In the following testcase:
>
> subroutine sub(aa,bb,n,m)
> implicit none
> integer, intent(in) :: n,m
> real, intent(inout) :: aa(n,m)
> real, intent(in) :: bb(n,m)
> integer :: i,j
> do i = 1,m
> do j= 2,n
> aa(i,j)= aa(i,j-1)+bb(i,j-1)
> enddo
> enddo
> end subroutine
> end
>
> The stride of the accesses in the inner-loop is a parameter (m is not a
> compile-time known constant). As a result the data dataref analyzer reports:
> "
> failed: evolution of offset is not affine
> ...
> base_address:
> offset from base address:
> constant offset from base address:
> step:
> aligned to:
> base_object: (*aa_54(D))[0]
> symbol tag: SMT.25
> "
>
> Any chance that the dataref analysis can return an (invariant) expression in
> "step", so that further analysis could continue? (for example, the access in
> the outer-loop is consecutive, so if we had an expression to represent the
> inner-loop stride, we could vectorize the outer-loop).
Making us return symbolic stride would not be hard. The problem is that data
dependence analysis would fail anyway, since we cannot tell whether n is zero.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33113