This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran,patch] PR fortran/28163: Don't call library function for string copying


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]