This is the mail archive of the gcc@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: Compile-time optimization of mathfn(CST) ?


On Thu, 25 Mar 2004, Kaveh R. Ghazi wrote:

> I understand that in the past it's been discussed that we need to use
> GMP's library to calculate the constant results to sufficient digits
> in the case where the target's FP has greater precision.  However I
> don't see anyone working on this yet, (including me.)

Once tree-ssa is merged to mainline there's likely to be more interest in
importing GMP (as a necessary prerequisite to this).

> So I'm wondering if we can simply call the host math functions and
> wrap this in !CROSS_COMPILE so that we catch a vast portion of the
> cases where this transformation is useful.

Generated code for a given target depending on whether cross-compiling, or
on the fine details of the host libc version or precise CPU stepping seems
a bad idea.  (The dependence on the CPU version, where the host library
uses CPU instructions for the operation but not all CPUs necessarily
produce bitwise identical results, would in particular be liable to
produce nonreproducibility for distcc compiles etc. - I don't think people
using compile farms necessarily use physically identical processors on all
machines.)

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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