[PATCH] (Partial) Implementation of simplificaiton of CSHIFT
Steve Kargl
sgk@troutmask.apl.washington.edu
Fri Nov 20 20:09:00 GMT 2015
On Thu, Nov 19, 2015 at 04:58:36PM -0800, Steve Kargl wrote:
>
> 2015-11-19 Steven G. Kargl <kargl@gcc.gnu.org>
>
> * intrinsic.h: Prototype for gfc_simplify_cshift
> * intrinsic.c (add_functions): Use gfc_simplify_cshift.
> * simplify.c (gfc_simplify_cshift): Implement simplification of CSHIFT.
> (gfc_simplify_spread): Remove a FIXME and add error condition.
>
> 2015-11-19 Steven G. Kargl <kargl@gcc.gnu.org>
>
> * gfortran.dg/simplify_cshift_1.f90: New test.
>
I've attached an updated patch. The changes consists of
1) better/more comments
2) re-organize code to reduce copying of the array.
3) add optimization for a left/right shift that
returns the original array.
4) Don't leak memory.
--
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cshift.diff
Type: text/x-diff
Size: 5926 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151120/5dbd2ecf/attachment.bin>
More information about the Gcc-patches
mailing list