where is math function inlining decision done?

Tobias Burnus burnus@net-b.de
Fri Jun 20 12:15:00 GMT 2008


IainS wrote:
> however, process sampling indicates that fmod might be the culprit ....
>
> In the case of one processor __builtin_fmod is getting replaced by an 
> inline
> In the case of the other __builtin_fmod is generating a call to libm.
>
> Where does gcc decide how to replace __builtin_fmod  ?
I don't know as this is a middle end question (i.e. you should ask 
better ask the middle end people), however, I sqw that 
config/darwin-ppc-ldouble-patch.def contains:

  PATCH_BUILTIN (BUILT_IN_FMODL)
(see also config/darwin.c -> darwin_darwin_patch_builtinspatch_builtins).

This might explain the PowerPC differences.

Otherwise, see expand_builtin_mathfn_2 and search for BUILT_IN_FMOD in 
./builtins.c


Tobias



More information about the Fortran mailing list