On 6/8/06, Daniel Berlin <[EMAIL PROTECTED]> wrote:
Richard Guenther wrote:
> We (me and Matz) thought over this as well and concluded it would be
> nice to have
>
>  - MEM_REF ( base, offset, alias_tag )
>
> with base being either some memory object or an INDIRECT_REF of a pointer and
> be done with that tree code.

So if you have MEM_REF(INDIRECT_REF(a),i,0), you really haven't done any
better in removing recursion :)

Well, unless you allow both pointers and objects as operand 0 of MEM_REF
you either need to build ADDR_EXPRs of objects or INDIRECT_REFs of pointers.
At least if you consider the goal of killing all other tcc_reference
trees and only have
MEM_REF as a way to access memory.  Using ADDR_EXPRs is less nice than
INDIRECT_REFs, because this way you make local aggregates addressable.

Another way of expressing MEM_REF (INDIRECT_REF (a), i, 0) could be of course
to have INDIRECT_MEM_REF (a, i, 0) - but that's just a detail of the
representation.

> The MEM_REF would also contain an alias tag for
> easy oracle queries

Tag has some meaning in our current structure.
I'd support some sort of generic token that associates the alias info
with it, however.

Yes, it is supposed to be a generic token that should be able to handle aliasing
queries of a to-be-invented middle-end aliasing query system, which we
need anyway
for cross-language LTO.

Richard.

Reply via email to