RFC/RFA: patch for PR 22156: improve SRA for bit-fields

Alexandre Oliva aoliva@redhat.com
Wed Mar 21 09:24:00 GMT 2007

On Mar 20, 2007, Richard Henderson <rth@redhat.com> wrote:

> On Tue, Mar 20, 2007 at 06:50:45AM -0300, Alexandre Oliva wrote:
>> +	  bit = nbit;

> How is it right to modify bit but not size?

It wasn't, thanks, fixed.

> Any reason to require that the bit fields be actually sequential?

Not really, it just appears simpler to implement in a first cut.

> 	  unsigned   : 1;

> needn't actually represent the unnamed (and unused) field in the
> type description,

ATM the field chain actually has an entry for unnamed fields, so we're

I found and fixed another bug in the type used for the replacement
BIT_FIELD_REF for a field block, which was causing some trouble
building the Ada rts (great testcases there! ;-)

With these fixes, the patch has passed the compiler bootstrap and is
now nearly at the end of building libraries on both x86_64-linux-gnu
and i686-pc-linux-gnu.  I'll hopefully have test results when I get
back up.

How does this look?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-sra-bit-field-ref.patch
Type: text/x-patch
Size: 21085 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070321/9cc2d729/attachment.bin>
-------------- next part --------------

Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

More information about the Gcc-patches mailing list