Hi,
This patch fixes ICE reported by PR90021.  The issue has been there since loop 
interchange
and recently exposed by patch for PR89725.  As PR comment suggests, we have 
equal access
function {{1, +, 1}_6, +, 1}_4 and _6 is of loop_nest's outer loop.  This patch 
introduces
new parameter loopnum to function evolution_function_is_univariate_p so that 
the above
scev won't be considered as multivariate, i.e, {1, +, 1}_6 is considered as a 
symbol to the
loop_nest.  Note we only change computation of classic dist vector, rather than 
DDR itself. 

Bootstrap and test on x86_64.  Is it ok?

BTW, I wonder if collecting data reference in one loop but computing DDR in an 
inner loop 
is useful in the future, besides loop interchange.

Thanks,
bin

2019-04-10  Bin Cheng  <bin.ch...@linux.alibaba.com>

        PR tree-optimization/92001
        * tree-chrec.c (evolution_function_is_univariate_p): New parameter
        and check univariate against it.
        * tree-chrec.h (evolution_function_is_univariate_p): New parameter.
        * tree-data-ref.c (add_other_self_distances): Pass new argument.

2018-04-10  Bin Cheng  <bin.ch...@linux.alibaba.com>

        PR tree-optimization/92001
        * gcc/testsuite/gfortran.dg/pr90021.f90: New test.

Attachment: 0001-pr90021.patch
Description: Binary data

Reply via email to