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: Kill CONST_DOUBLE_CHAIN


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


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