This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: where is math function inlining decision done?


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



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