Re: adjacent bitfields optimization

2011-04-26 Thread Richard Guenther
On Tue, Apr 26, 2011 at 3:39 PM, cirrus75 wrote: > >  Hi, > >  Actually, I would like to ask if all this should be tree level optimization > or there would be something to do at backend. I am asking because I am trying > to write a new backend. It should be dealt with at the tree level by lower

Re: adjacent bitfields optimization

2011-04-26 Thread cirrus75
Hi, Actually, I would like to ask if all this should be tree level optimization or there would be something to do at backend. I am asking because I am trying to write a new backend. thanks, Alex R. Prado Em 25/04/2011 14:47, Ian Lance Taylor < i...@google.com > escreveu: cirrus75 writes

Re: adjacent bitfields optimization

2011-04-25 Thread Ian Lance Taylor
cirrus75 writes: > For the fllowing code: > > typedef struct { > int f1:1; > int f2:1; > int f3:1; > int f4:29; > } t1; > > typedef struct { > int f1:1; > int f2:1; > int f3:30; > } t2; > > t1 s1; > t2 s2; > > void func1(void) > { > s1.f1 = s2.f1; > s1.f2 = s2.f2; > } > > we get (x86_64