This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Compile-time optimization of mathfn(CST) ?
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 25 Mar 2004 08:20:52 -0500 (EST)
- Subject: Compile-time optimization of mathfn(CST) ?
I'm wondering whether we can safely optimize builtin mathfn(CST) into
a compile-time value by calling the host's `mathfn' when not
cross-compiling.
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.)
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.
Thoughts?
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu