This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: where is math function inlining decision done?
- From: Tobias Burnus <burnus at net-b dot de>
- To: IainS <developer at sandoe-acoustics dot co dot uk>
- Cc: Fortran List <fortran at gcc dot gnu dot org>
- Date: Fri, 20 Jun 2008 14:15:16 +0200
- Subject: Re: where is math function inlining decision done?
- References: <5875D8A7-5891-4E15-9928-40621E0891C6@sandoe-acoustics.co.uk>
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