Hello,

> This looks like a very complicated (though very generic) way of
> specifying a memory
> reference.  Last time we discussed this I proposed to just have BASE, OFFSET
> and accessed TYPE (and an alias tag of the memory reference).  I realize 
> this
> doesn't cover accesses to multi-dimensional arrays, but using the
> full-blown scheme
> in place of a simple INDIRECT_REF makes memory usage for the trees go up
> noticable.

as was pointed out before, you cannot avoid remembering the indices of
the memory reference in some way if you want to be able to do dependency
analysis.  Also, many high-level optimizations work with
multidimensional arrays, so the representation should make this
possible.

Regarding the memory consumption, let us forget the part of the
information for alias analysis (that for simplicity proposes preserving
the current representation, but that can be changed).  Then, the proposed
representation still is cheaper than the current way (component_refs are
collapsed into a single offset field; only the necessary information is
recorded for indices, whereas now we have redundant information stored
in ARRAY_REFs).

For simple indirect_refs, there are no indices, so the overhead of
the proposal over the base+offset one is basically one pointer.

Zdenek

Reply via email to