On 4/4/07, Zdenek Dvorak <[EMAIL PROTECTED]> wrote:
Hello,
> >> >-- flags
> >> >
> >> >for each index, we remeber
> >> >-- lower and upper bound
> >> >-- step
> >> >-- value of the index
> >>
> >> This seems a lot, however, since most of it can be derived from the
> >> types, why are we also keeping it in the references.
> >
> >The lower bound and step may be SSA_NAMEs, see the current ARRAY_REF,
> >and as such, they need to be stored somewhere in IR (not just in type).
> >
> >> That is, unless we could share most of the index struct (upper,
> >> lower, step) among expressions that access them (IE make index be
> >> immutable, and require unsharing and resharing if you want to modify
> >> the expression).
> >
> >That appears a bit dangerous to me, I would rather avoid such tricks.
>
> Like Richard, I have doubts you are not going to increase memory if
> you store *this* much in every single memory access.
for structured accesses (ARRAY_REFs etc.) we now need much more memory --
4 pointers, plus overhead of the common tree fields. My proposal will
save some memory here.
I can dig out a patch that removes the two pointers that are amost
always NULL. But it didn't make a whole lot of a difference.
Richard.