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]

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


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