[patch, libgfortran] Use memcpy in a few more places for eoshift

Thomas Koenig tkoenig@netcologne.de
Mon Jul 3 22:06:00 GMT 2017


Hello world,

attached are a few more speedups for special eoshift cases.  This
time, nothing fancy, just use memcpy for copying in the
contiguous case.

I am still looking at eoshift2 (scalar shift, array boundary)
to see if it would be possible to duplicate the speed gains for
eoshift0 (scalar shift, scalar boundary), but it won't hurt
to do this first.  At least the shift along dimension 1
should be faster by about a factor of two.

I have also added a few test cases which test eoshift in all
the variants touched by this patch.

Regression-testing as I write this.  I don't expect anything bad
(because I tested all test cases containing *eoshift*).

OK for trunk if this passes?

Regards

	Thomas

2017-06-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

         * intrinsics/eoshift2.c (eoshift2):  Use memcpy
         for innermost copy where possible.
         * m4/eoshift1.m4 (eoshift1): Likewise.
         * m4/eoshift3.m4 (eoshift3): Likewise.
         * generated/eoshift1_16.c: Regenerated.
         * generated/eoshift1_4.c: Regenerated.
         * generated/eoshift1_8.c: Regenerated.
         * generated/eoshift3_16.c: Regenerated.
         * generated/eoshift3_4.c: Regenerated.
         * generated/eoshift3_8.c: Regenerated.

2017-06-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

         * gfortran.dg/eoshift_4.f90:  New test.
         * gfortran.dg/eoshift_5.f90:  New test.
         * gfortran.dg/eoshift_6.f90:  New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 8255 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170703/6deed53d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eoshift_4.f90
Type: text/x-fortran
Size: 4830 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170703/6deed53d/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eoshift_5.f90
Type: text/x-fortran
Size: 4645 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170703/6deed53d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eoshift_6.f90
Type: text/x-fortran
Size: 4679 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170703/6deed53d/attachment-0003.bin>


More information about the Gcc-patches mailing list