This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Kill CONST_DOUBLE_CHAIN
- From: Stan Shebs <shebs at apple dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Apr 2002 11:50:50 -0700
- Subject: Re: Kill CONST_DOUBLE_CHAIN
- References: <20020424181728.GA26266@codesourcery.com>
Zack Weinberg wrote:
>
> The only thing we use the CONST_DOUBLE_CHAIN for anymore is making all
> CONST_DOUBLEs unique in the current function. However, nothing seems
> to care, and it complicates things unnecessarily. CONST_DOUBLEs are
> rare enough that I'm not particularly worried about wasting memory
> with them (we may save just as much from getting rid of the chain
> pointer).
Um, we care - or more accurately, our customers with lots of
floating point code care a lot, and their cares are our cares. :-)
Not sharing doubles makes code larger, and if you have good
indexing, it makes it slower too. My personal experience with
numerical code is that the same constants do recur repeatedly
within a function, especially if it has been manually unrolled
and otherwise tuned.
We can always revive this in our local version of GCC, but I'm
curious - why did this seem like a good idea?
Stan