This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: initialize dconsts lazily, improve GCC startup time
On Wed, Mar 26, 2008 at 2:21 PM, Kaveh R. Ghazi <email@example.com> wrote:
> From: "Richard Guenther" <firstname.lastname@example.org>
> > Ok with one change:
> >> @@ -8244,7 +8251,7 @@ fold_builtin_logarithm (tree fndecl, tre
> >> CASE_FLT_FN (BUILT_IN_EXP10):
> >> CASE_FLT_FN (BUILT_IN_POW10):
> >> /* Prepare to do logN(exp10(exponent) -> exponent*logN(10).
> >> */
> >> - x = build_real (type, dconst10);
> >> + x = build_real_from_int_cst (type, build_int_cst (NULL_TREE,
> >> 10));
> >> exponent = CALL_EXPR_ARG (arg, 0);
> >> break;
> >> CASE_FLT_FN (BUILT_IN_SQRT):
> > Please use build_real_from_int here to avoid build_int_cst with a NULL
> > type.
> > Richard.
> Um, I don't see any such function in GCC. I tried looking for one before I
> submitted my patch and didn't find anything that goes directly from 10 to a
> "real" tree. Perhaps it has another name?
Indeed. real_from_integer, as used in your patch in a different place:
real_from_integer (&dconst3, VOIDmode, 3, 0, 0);