This is the mail archive of the gcc@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: Existing tree functionality?


On Thu, Jul 07, 2005 at 01:28:18PM -0400, Michael Tegtmeyer wrote:

> So the question is, what is the easiest way to obtain the
> specific field that was referenced in this case?
>
You need to traverse the IL and examine the LHS and RHS of
expressions for COMPONENT_REF and INDIRECT_REF expressions.  In
GIMPLE these expressions may only appear on the LHS or RHS of
assignments, and in function arguments.

You then need to walk the expression looking for FIELD_DECLs.
And you had better do this before SRA (which will decompose most
structure references into compiler generated scalars).


Diego.


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