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: RFC/RFA: patch for PR 22156: improve SRA for bit-fields


> Would you please let me know whether this is still the case for the
> patch I've just posted in the thread "Reload bug & SRA oddness"?
> http://gcc.gnu.org/ml/gcc-patches/2007-05/msg00317.html

Well, you can just build the Ada compiler (it builds now) on your preferred 
platform and run it on the testcase at -O.  There should be no BIT_FIELD_REF 
at all after SRA.

> I'm not sure why this is bad, if the bitfield access patterns are
> whole-word accesses, which presumably access a single register.

If this reasoning was true, then why not simply replace all COMPONENT_REFs 
with BIT_FIELD_REFs?

> I see that that register allocation may be poorer because of the pairing.

But SRA is supposed to *split* structures, not split and reassemble them in a 
more convoluted way!

> I wonder if clipping align at BITS_PER_WORD is the right answer...  It
> would limit coalescing of wider bit-fields, but this is probably not
> such a big deal.

I'd simply test DECL_BIT_FIELD.

-- 
Eric Botcazou


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