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: [PATCH][RFC] Fix PR54201, share constant pool entries for CONST_VECTORs


On Tue, 14 Aug 2012, Richard Guenther wrote:

> 
> This implements constant pool entry sharing for CONST_VECTORs with the
> same bit-pattern by canonicalizing them to the same-sized mode with
> the least number of elements.  Ideally we would be able to hash and
> compare the in-memory representation of a constant (together with
> its alignment requirement), but I'm not aware of any RTL facility
> that would be equivalent to native_{interpret,encode}_expr.  So this
> just handles CONST_VECTORs as requested in the bugreport.
> 
> Bootstrap and regtest pending on x86_64-unknown-linux-gnu.
> 
> Any comments?

While it shares constant pool entries, CSE is not smart enough
to CSE loads with different mode from the same constant pool entry.
So we don't see the looked for reduction in register pressure
and thus IMHO the patch is not worth the trouble in its current
form.

Richard.


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