[gfortran,patch] PR fortran/28163: Don't call library function for string copying
Bernhard Fischer
rep.nop@aon.at
Sun Jun 25 15:05:00 GMT 2006
On Sun, Jun 25, 2006 at 02:44:53PM +0200, FX Coudert wrote:
>:ADDPATCH fortran:
>
>Currently, gfortran generates library calls for string copying. This is
>a major performance bottleneck: removing it and replacing these calls by
>direct code and calls to memmove/memset, as does the attached patch,
>gives a 27% speedup in execution time for aermod (from the polyhedron
>benchmark).
>
>I'd welcome a careful review of this patch. In particular, I think the
>following lines
>
>+ tmp4 = gfc_chainon_list (tmp4, build_int_cst
>+ (gfc_get_int_type (gfc_c_int_kind), ' '));
>
>are wrong for cross-compilers, as the host ' ' may not be the same as
>the target ' '. But I don't know how to do anything better, so I'd
>welcome hints on this one.
>
>Bootstrapped and regtested on i686-linux.
>
>OK for mainline?
I'm curious if this should be selectable via something like
-minline-all-stringops resp. -f{no-}builtin-whatever?
While it may give a nice performance boost, it most likely is something
e.g. -Os doesn't like, fwiw.
More information about the Gcc-patches
mailing list