[patch] New instantiate_scev function for data dependence tests in loop nests

Sebastian Pop sebpop@gmail.com
Thu May 8 15:46:00 GMT 2008


Hi,

Working on a data dependence problem with Jan, we realized that the
instantiation of the scalar evolutions was done in the outermost loop
of the nest, and that there was no way to ask for keeping the analyzed
evolution in the innermost loop, and instantiate all the symbols
defined in the outermost loop.  For instance, we were looking at this
loop nest:

loop_1
  k = phi (0, k + 1)
  loop_2 runs 4 times
    j = phi (0, j + 1)
    loop_3 runs 4 times
      i = phi (0, i + 1)
      A[j + k] = ...
    endloop
  endloop
endloop

Analyzing the access function of array A with instantiate_parameters
(loop_1, "j + k"), we obtain the instantiation and the analysis of the
scalar variables "j" and "k" in loop_1.  This leads to the scalar
evolution {4, +, 1}_1: the end value of loop_2 for "j" is 4, and the
evolution of "k" in loop_1 is {0, +, 1}_1.  To obtain the evolution
function in loop_3 and instantiate the scalar variables up to loop_1,
one has to use: instantiate_scev (loop_1, loop_3, "j + k").  The
result of this call is {{0, +, 1}_1, +, 1}_2.

Bootstrapped and tested on amd64-linux.  I will apply the attached
patch in the next days, unless there are comments or suggestions.

-- 
Sebastian Pop
AMD - GNU Tools

---------- Forwarded message ----------
From:  <spop@gcc13.fsffrance.org>
Date: Wed, May 7, 2008 at 9:59 PM
Subject: [regtest] Results for 1005_instantiate_scev.diff on
x86_64-unknown-linux-gnu
To: sebpop@gmail.com, jan.sjodin@amd.com


Checker: (cat /home/spop/state/testing/patched/report
 there are no regressions with your patch.
 Checker: tac)
 Checker: FAILs with patched version:
 Checker: (cat /home/spop/state/testing/patched/failed
 g++.sum g++.dg/tree-ssa/pr19637.C
 libstdc++.sum 22_locale/time_get/get_date/wchar_t/4.cc
 Checker: tac)
 Checker: FAILs with pristine version:
 Checker: (cat /home/spop/state//trunk/135057/failed
 g++.sum g++.dg/tree-ssa/pr19637.C
 libstdc++.sum 22_locale/time_get/get_date/wchar_t/4.cc
 Checker: tac)
 Checker: The files used for the validation of your patch are stored
in /home/spop/state/patched/2008_05_08_02_59_06 on the tester machine.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1005_instantiate_scev.diff
Type: text/x-diff
Size: 17443 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080508/bc1bb7d3/attachment.bin>


More information about the Gcc-patches mailing list