Hello, > >Proposal: > > > >For each memory reference, we remember the following information: > > > >-- base of the reference > >-- constant offset > >-- vector of indices > >-- type of the accessed location > >-- original tree of the memory reference (or another summary of the > > structure of the access, for aliasing purposes) > This i don't think we should keep, because i don't believe it's > necessary for aliasing. At worst, aliasing could come up with it's > own summary if it really wanted to.
long term, I totally agree with you. Short term, I think even implementing the proposal in the current form will be a lot of work; I somewhat fear having to include having to modify alias analysis significantly into it (of course, if someone familiar with tree alias analysis -- i.e., you or Diego -- volunteered to help me with this part of the change, it would help a lot). > >-- 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. Zdenek