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: [tree-ssa] PATCH to &&/|| gimplification


On Fri, 2003-05-30 at 10:47, Richard Kenner wrote:

> struct r1 {int x;};
> struct foo {int a; struct r1 f;};
> 
> int
> bar (struct foo *p)
> {
>   return p->a + p->f.x;
> }
> 
> on Alpha, we have:
> 
> 	ldl $1,4($16)	 # <variable>.f.x, <variable>.f.x
> 	ldl $0,0($16)	 # <variable>.a, <variable>.a
> 	addl $0,$1,$0	 # <variable>.a, <variable>.b, tmp75
> 	ret $31,($26),1
> 
> The issue is how to preserve which field you are referencing if you
> convert all COMPONENT_REF/ARRAY_REF nestings into address calculations.
>
Ah, I see.  Sure, we'll have to make sure that we don't lose that
information.  I don't think it would be hard to preserve this
information as we proceed down the lowering phase.  Are there tests in
the testsuite that may help making sure we get it right?


Diego.


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