From: "Richard Guenther" <richard.guenther@gmail.com>
To: "Kaveh R. GHAZI" <ghazi@caip.rutgers.edu>
Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH]: bump minimum MPFR version, (includes some fortran bits)
Date: Sun, 05 Oct 2008 13:52:00 -0000 [thread overview]
Message-ID: <84fc9c000810050618w423e7ca0x24734cf039d20f@mail.gmail.com> (raw)
In-Reply-To: <Pine.GSO.4.58.0810042125450.1560@caipclassic.rutgers.edu>
On Sun, Oct 5, 2008 at 3:33 AM, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> Since we're in stage3, I'm raising the issue of the MPFR version we
> require for GCC, just as in last year's stage3 for gcc-4.3:
> http://gcc.gnu.org/ml/gcc/2007-12/msg00298.html
>
> I'd like to increase the "minimum" MPFR version to 2.3.0, (which has been
> released since Aug 2007). The "recommended" version of MPFR can be bumped
> to the latest which is 2.3.2.
>
> Doing this will allow me to remove several MPFR cpp conditionals in the
> middle-end as well as in the fortran frontend. It also helps for future
> work I plan to do with folding c99 complex number math functions, as that
> work will require mpfr-2.3.0.
>
> Patch bootstrapped on x86_64-unknown-linux-gnu using mpfr-2.3.2, no
> regresions. I also configured with mpfr-2.2.0 to ensure that GCC still
> fails the relevant checks with older versions of mpfr.
>
> If approved, I'll again wait a week before installing so people can
> upgrade their regtesters if necessary.
This is reasonable. Note that
http://gcc.gnu.org/install/prerequisites.html already lists
mpfr 2.3.0 as prerequesite (that page still might need an update for
clarification).
> Okay for mainline?
Ok if there are no objections within the week.
Thanks,
Richard.
> Thanks,
> --Kaveh
>
>
> 2008-10-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
>
> * configure.ac (MPFR check): Bump minimum version to 2.3.0 and
> recommended version to 2.3.2.
> * builtins.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
> * doc/install.texi: Bump recommended MPFR to 2.3.2.
>
> * configure: Regenerate.
>
> fortran:
> * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
>
> diff -rup orig/egcc-SVN20081001/configure.ac egcc-SVN20081001/configure.ac
> --- orig/egcc-SVN20081001/configure.ac 2008-09-06 02:00:10.000000000 +0200
> +++ egcc-SVN20081001/configure.ac 2008-10-04 20:19:15.000000000 +0200
> @@ -1267,11 +1267,11 @@ if test -d ${srcdir}/gcc && test "x$have
> if test x"$have_gmp" = xyes; then
> saved_LIBS="$LIBS"
> LIBS="$LIBS $gmplibs"
> - dnl MPFR 2.2.1 is acceptable, but MPFR 2.3.0 is better.
> + dnl MPFR 2.3.0 is acceptable, but MPFR 2.3.2 is better.
> AC_MSG_CHECKING([for correct version of mpfr.h])
> AC_TRY_LINK([#include <gmp.h>
> #include <mpfr.h>],[
> - #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
> + #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,0)
> choke me
> #endif
> mpfr_t n;
> @@ -1284,7 +1284,7 @@ if test -d ${srcdir}/gcc && test "x$have
> mpfr_subnormalize (x, t, GMP_RNDN);
> ], [AC_TRY_LINK([#include <gmp.h>
> #include <mpfr.h>],[
> - #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,0)
> + #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,2)
> choke me
> #endif
> mpfr_t n; mpfr_init(n);
> @@ -1295,7 +1295,7 @@ if test -d ${srcdir}/gcc && test "x$have
> CFLAGS="$saved_CFLAGS"
>
> if test x$have_gmp != xyes; then
> - AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
> + AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.3.2+.
> Try the --with-gmp and/or --with-mpfr options to specify their locations.
> Copies of these libraries' source code can be found at their respective
> hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
> diff -rup orig/egcc-SVN20081001/gcc/builtins.c egcc-SVN20081001/gcc/builtins.c
> --- orig/egcc-SVN20081001/gcc/builtins.c 2008-08-30 02:00:13.000000000 +0200
> +++ egcc-SVN20081001/gcc/builtins.c 2008-10-04 20:22:06.000000000 +0200
> @@ -231,13 +231,11 @@ static tree do_mpfr_arg2 (tree, tree, tr
> static tree do_mpfr_arg3 (tree, tree, tree, tree,
> int (*)(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mp_rnd_t));
> static tree do_mpfr_sincos (tree, tree, tree);
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> static tree do_mpfr_bessel_n (tree, tree, tree,
> int (*)(mpfr_ptr, long, mpfr_srcptr, mp_rnd_t),
> const REAL_VALUE_TYPE *, bool);
> static tree do_mpfr_remquo (tree, tree, tree);
> static tree do_mpfr_lgamma_r (tree, tree, tree);
> -#endif
>
> /* Return true if NODE should be considered for inline expansion regardless
> of the optimization level. This means whenever a function is invoked with
> @@ -10112,7 +10110,6 @@ fold_builtin_1 (tree fndecl, tree arg0,
> &dconstm1, NULL, false);
> break;
>
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> CASE_FLT_FN (BUILT_IN_J0):
> if (validate_arg (arg0, REAL_TYPE))
> return do_mpfr_arg1 (arg0, type, mpfr_j0,
> @@ -10136,7 +10133,6 @@ fold_builtin_1 (tree fndecl, tree arg0,
> return do_mpfr_arg1 (arg0, type, mpfr_y1,
> &dconst0, NULL, false);
> break;
> -#endif
>
> CASE_FLT_FN (BUILT_IN_NAN):
> case BUILT_IN_NAND32:
> @@ -10252,7 +10248,6 @@ fold_builtin_2 (tree fndecl, tree arg0,
>
> switch (fcode)
> {
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> CASE_FLT_FN (BUILT_IN_JN):
> if (validate_arg (arg0, INTEGER_TYPE)
> && validate_arg (arg1, REAL_TYPE))
> @@ -10279,7 +10274,6 @@ fold_builtin_2 (tree fndecl, tree arg0,
> && validate_arg(arg1, POINTER_TYPE))
> return do_mpfr_lgamma_r (arg0, arg1, type);
> break;
> -#endif
>
> CASE_FLT_FN (BUILT_IN_ATAN2):
> if (validate_arg (arg0, REAL_TYPE)
> @@ -10436,14 +10430,12 @@ fold_builtin_3 (tree fndecl, tree arg0,
> return do_mpfr_arg3 (arg0, arg1, arg2, type, mpfr_fma);
> break;
>
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> CASE_FLT_FN (BUILT_IN_REMQUO):
> if (validate_arg (arg0, REAL_TYPE)
> && validate_arg(arg1, REAL_TYPE)
> && validate_arg(arg2, POINTER_TYPE))
> return do_mpfr_remquo (arg0, arg1, arg2);
> break;
> -#endif
>
> case BUILT_IN_MEMSET:
> return fold_builtin_memset (arg0, arg1, arg2, type, ignore);
> @@ -13054,7 +13046,6 @@ do_mpfr_sincos (tree arg, tree arg_sinp,
> return result;
> }
>
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> /* If argument ARG1 is an INTEGER_CST and ARG2 is a REAL_CST, call the
> two-argument mpfr order N Bessel function FUNC on them and return
> the resulting value as a tree with type TYPE. The mpfr precision
> @@ -13239,7 +13230,6 @@ do_mpfr_lgamma_r (tree arg, tree arg_sg,
>
> return result;
> }
> -#endif
>
> /* FIXME tuples.
> The functions below provide an alternate interface for folding
> diff -rup orig/egcc-SVN20081001/gcc/doc/install.texi egcc-SVN20081001/gcc/doc/install.texi
> --- orig/egcc-SVN20081001/gcc/doc/install.texi 2008-09-14 02:00:04.000000000 +0200
> +++ egcc-SVN20081001/gcc/doc/install.texi 2008-10-04 20:20:03.000000000 +0200
> @@ -309,7 +309,7 @@ library search path, you will have to co
> @option{--with-gmp} configure option. See also
> @option{--with-gmp-lib} and @option{--with-gmp-include}.
>
> -@item MPFR Library version 2.3.0 (or later)
> +@item MPFR Library version 2.3.2 (or later)
>
> Necessary to build GCC@. It can be downloaded from
> @uref{http://www.mpfr.org/}. The version of MPFR that is bundled with
> diff -rup orig/egcc-SVN20081001/gcc/fortran/simplify.c egcc-SVN20081001/gcc/fortran/simplify.c
> --- orig/egcc-SVN20081001/gcc/fortran/simplify.c 2008-09-12 02:00:04.000000000 +0200
> +++ egcc-SVN20081001/gcc/fortran/simplify.c 2008-10-04 20:22:58.000000000 +0200
> @@ -668,7 +668,6 @@ gfc_simplify_atan2 (gfc_expr *y, gfc_exp
> gfc_expr *
> gfc_simplify_bessel_j0 (gfc_expr *x ATTRIBUTE_UNUSED)
> {
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> gfc_expr *result;
>
> if (x->expr_type != EXPR_CONSTANT)
> @@ -678,16 +677,12 @@ gfc_simplify_bessel_j0 (gfc_expr *x ATTR
> mpfr_j0 (result->value.real, x->value.real, GFC_RND_MODE);
>
> return range_check (result, "BESSEL_J0");
> -#else
> - return NULL;
> -#endif
> }
>
>
> gfc_expr *
> gfc_simplify_bessel_j1 (gfc_expr *x ATTRIBUTE_UNUSED)
> {
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> gfc_expr *result;
>
> if (x->expr_type != EXPR_CONSTANT)
> @@ -697,9 +692,6 @@ gfc_simplify_bessel_j1 (gfc_expr *x ATTR
> mpfr_j1 (result->value.real, x->value.real, GFC_RND_MODE);
>
> return range_check (result, "BESSEL_J1");
> -#else
> - return NULL;
> -#endif
> }
>
>
> @@ -707,7 +699,6 @@ gfc_expr *
> gfc_simplify_bessel_jn (gfc_expr *order ATTRIBUTE_UNUSED,
> gfc_expr *x ATTRIBUTE_UNUSED)
> {
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> gfc_expr *result;
> long n;
>
> @@ -719,16 +710,12 @@ gfc_simplify_bessel_jn (gfc_expr *order
> mpfr_jn (result->value.real, n, x->value.real, GFC_RND_MODE);
>
> return range_check (result, "BESSEL_JN");
> -#else
> - return NULL;
> -#endif
> }
>
>
> gfc_expr *
> gfc_simplify_bessel_y0 (gfc_expr *x ATTRIBUTE_UNUSED)
> {
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> gfc_expr *result;
>
> if (x->expr_type != EXPR_CONSTANT)
> @@ -738,16 +725,12 @@ gfc_simplify_bessel_y0 (gfc_expr *x ATTR
> mpfr_y0 (result->value.real, x->value.real, GFC_RND_MODE);
>
> return range_check (result, "BESSEL_Y0");
> -#else
> - return NULL;
> -#endif
> }
>
>
> gfc_expr *
> gfc_simplify_bessel_y1 (gfc_expr *x ATTRIBUTE_UNUSED)
> {
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> gfc_expr *result;
>
> if (x->expr_type != EXPR_CONSTANT)
> @@ -757,9 +740,6 @@ gfc_simplify_bessel_y1 (gfc_expr *x ATTR
> mpfr_y1 (result->value.real, x->value.real, GFC_RND_MODE);
>
> return range_check (result, "BESSEL_Y1");
> -#else
> - return NULL;
> -#endif
> }
>
>
> @@ -767,7 +747,6 @@ gfc_expr *
> gfc_simplify_bessel_yn (gfc_expr *order ATTRIBUTE_UNUSED,
> gfc_expr *x ATTRIBUTE_UNUSED)
> {
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> gfc_expr *result;
> long n;
>
> @@ -779,9 +758,6 @@ gfc_simplify_bessel_yn (gfc_expr *order
> mpfr_yn (result->value.real, n, x->value.real, GFC_RND_MODE);
>
> return range_check (result, "BESSEL_YN");
> -#else
> - return NULL;
> -#endif
> }
>
>
> @@ -2459,7 +2435,6 @@ gfc_simplify_len_trim (gfc_expr *e, gfc_
> gfc_expr *
> gfc_simplify_lgamma (gfc_expr *x ATTRIBUTE_UNUSED)
> {
> -#if MPFR_VERSION >= MPFR_VERSION_NUM(2,3,0)
> gfc_expr *result;
> int sg;
>
> @@ -2471,9 +2446,6 @@ gfc_simplify_lgamma (gfc_expr *x ATTRIBU
> mpfr_lgamma (result->value.real, &sg, x->value.real, GFC_RND_MODE);
>
> return range_check (result, "LGAMMA");
> -#else
> - return NULL;
> -#endif
> }
>
>
>
next prev parent reply other threads:[~2008-10-05 13:19 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-05 5:56 Kaveh R. GHAZI
2008-10-05 13:52 ` Richard Guenther [this message]
2008-10-05 14:10 ` Gerald Pfeifer
2008-10-05 14:43 ` Richard Guenther
2008-10-05 16:34 ` Manuel López-Ibáñez
2008-10-06 23:37 ` Kaveh R. Ghazi
2008-10-07 7:55 ` Janne Blomqvist
2008-10-06 13:56 ` Adrian Bunk
2008-10-06 23:16 ` [PATCH]: bump minimum MPFR version, (includes some fortranbits) Kaveh R. Ghazi
2008-10-06 23:40 ` Ben Elliston
2008-10-07 0:35 ` Andrew Pinski
2008-10-07 18:52 ` Adrian Bunk
2008-10-13 16:00 ` Vincent Lefevre
2008-10-13 16:42 ` Antwort: " Markus Milleder
2008-10-13 17:15 ` Adrian Bunk
2008-10-14 12:59 ` Antwort: " Markus Milleder
2008-10-14 13:10 ` Jakub Jelinek
2008-10-14 13:21 ` Tobias Schlüter
2008-10-14 14:52 ` Adrian Bunk
2008-10-14 15:39 ` Tobias Schlüter
2008-10-14 13:30 ` Antwort: Re: Antwort: " Adrian Bunk
2008-10-14 22:29 ` Nils Pipenbrinck
2008-10-14 22:31 ` Andrew Pinski
2008-10-15 0:59 ` Nils Pipenbrinck
2008-10-15 1:01 ` Andrew Pinski
2008-10-15 10:56 ` Brian Dessent
2008-10-15 1:09 ` Dave Korn
2008-10-26 12:59 ` [PATCH]: bump minimum MPFR version, (includes some fortran bits) Geoff Keating
2008-10-26 14:42 ` Jakub Jelinek
2008-10-27 2:50 ` Kaveh R. Ghazi
2008-10-27 7:03 ` David Edelsohn
2008-10-27 15:03 ` Joseph S. Myers
2008-10-27 15:14 ` Richard Guenther
2008-10-27 16:53 ` Joseph S. Myers
2008-10-27 20:34 ` Roberto Bagnara
2008-10-27 16:17 ` David Edelsohn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84fc9c000810050618w423e7ca0x24734cf039d20f@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc@gcc.gnu.org \
--cc=ghazi@caip.rutgers.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).