This is the mail archive of the
mailing list for the GCC project.
Re: how to get the field_id for member of structure in gcc front end
On Wed, 2006-03-29 at 15:03 +0800, Tianwei Sheng wrote:
> I need the field_info to help in alias analysis. for example:
> int *p = &pair.a;
> int *q = &pair.b;
> then if I can set length of "*p" to 4,ofset is '0' . for "*q" to
> "8,4". also I know that p definitly points to pair.a and q points to
> pair.b, then i can say "*p" and "*q" are not aliased with each other.
We already do this in 4.2 see access_can_touch_variable and
overlap_subvar in tree-ssa-operands.c.
Also, since 4.1, the pointer analysis at the tree level is field
sensitive, so knows these things. See tree-ssa-structalias.c