This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Extend lazy computation of expensive preprocessor macros to FLOATN*
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, Marek Polacek <polacek at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 26 Jan 2018 23:22:04 +0000
- Subject: Re: [PATCH] Extend lazy computation of expensive preprocessor macros to FLOATN*
- Authentication-results: sourceware.org; auth=none
- References: <20180126231100.GC2063@tucnak>
On Sat, 27 Jan 2018, Jakub Jelinek wrote:
> Hi!
>
> Honza reported today on IRC that we spent (again) significant time
> of empty file compilation computing preprocessor *_MAX/*_MIN etc. macros.
> In 2010 I've added lazy computation for these, only when they are first used
> except for -dD, but reserved just 12 entries for those, as only
> FLT/DBL/LDBL prefixed macros (4 times for each kind) were needed at that
> point. In 2016 for PR32187 Joseph has added a bunch of other kinds and
> because there is no space in the array reserved for those, they are
> evaluated right away, which is quite expensive.
>
> The following patch makes them lazy again.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Rather than hardcoding a number 36 I'd rather it used an explicit
computation (with explanatory comment) such as 4 * (3 +
NUM_FLOATN_NX_TYPES) (if that is indeed a safe value to use to guarantee
covering all these types).
--
Joseph S. Myers
joseph@codesourcery.com