[sac-user] A Question about the Optimizations of Single Assignment C

Sven-Bodo Scholz S.Scholz at herts.ac.uk
Tue Nov 27 19:07:05 GMT 2007


On Tue, Nov 27, 2007 at 04:37:17PM +0000, Sven-Bodo Scholz wrote:

Dear Bin,

> 
> Well, I would have thought so too ;-) Unfortunately, it does :-(
> I will look into that..... meanwhile:

good news! As of version 15665 this problem is fixed.

This example:

use Structures:all;
use StdIO:all;

int main()
{
   v1=genarray([10000],2);
   v2=genarray([10000],3);

   for( i=0; i< 10; i++) {
      v1=with(iv)
         (.<=iv<=[5000]):v1[iv]+v2[iv];
         ([5001]<=iv<=[9000]):v1[iv]-v2[iv];
         ([9001]<=iv<=.):v1[iv]+v2[iv];
      modarray(v1);
   }
   print(v1);

   return(0);
}

now yields 5 simd files: two for the initial computations and
three for the segments of the with-loop within the for loop.

the problem was that we did not mark with-loop bodies as SIMDable
if they contained any selection operation. In fact, to be conservative,
we must not simd-fy bodies that contain arbitrary selections;
or can we handle arbitrary selections within simd - files?????

However, in the cases that you wish to analyse we need this. Therefore,
I have changed the annotation process to allow ARBITRARY selections
within With-Loop bodies.

As a consequence, we may emit now simd files that contain selections
which you may not be able to simd-fy ?!?!

Enjoy the new freedom ;-))

  Bodo




More information about the sac-user mailing list