This is the mail archive of the gcc-patches@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: [PATCH 4.5 0/N]: Integrate GCC with the complex math library MPC


On Sun, Mar 15, 2009 at 5:10 PM, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> This series of patches integrates GCC with the complex math library MPC.
> MPC is the complex analogue to MPFR. ?It is written by some of the same
> folks with the same accuracy and precision principles. ?MPC is licensed
> under the LGPL. ?See: http://www.multiprecision.org/mpc/
>
> Among the potential benefits of using MPC are:
>
> 1. ?Folding of complex builtins with constant arguments in the
> ? ?middle-end, e.g. csin(a + bI) -> c + dI. ?Of course complex
> ? ?builtins may not start out with a constant argument, but various
> ? ?optimizations may infer what the argument is and allow the folding
> ? ?to occur.
>
> 2. ?Folding of fortran intrinsics. ?(These optimizations don't go
> ? ?through the middle-end and so right now have duplicate functionality).
>
> 3. ?Addressing complex folding bugs like PR30789 that can be tricky
> ? ?to fix (even with MPFR).
>
>
> MPC is currently under 0.x version development and is not entirely
> complete with respect to c99 complex builtins yet (but their plan is to do
> all of the c99 math functions with c99 semantics for the special cases.)
> Also as far as I'm aware, MPC is not yet included with distros or binary
> sites like MPFR is.
>
> Because of these issues, I have written the patch to make MPC's use
> *optional* for now. ?So GCC developers without MPC should not notice
> anything. ?And I have only implemented item #1 above for middle-end
> builtins all conditionalized on configure finding the library and ensuring
> the necessary bits are available. ?We can obviously revisit this decision
> and hard require MPC when it's more mature.

If MPC support is optional I think we should add an optimization flag
to turn off MPC use to be able to properly deal with bugreports from
people using a compiler built without MPC support.

For adding a new build and runtime dependency to GCC I think you have
to ask the SC to ok this (there's probably also legal ACK required by the FSF
which you'll get through the SC as well).

Btw, which Linux distributions ship MPC?  Is MPC supported on all GCC
primary and secondary host systems?

Thanks,
Richard.


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