This is the mail archive of the gcc-patches@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: MEM_EXPRs vs MEM_DECLs


On Tue, Dec 04, 2001 at 06:24:43AM -0500, Richard Kenner wrote:
> So when we address a field, we at a variable offset (e.g., there's an array
> reference in there), we have a NULL offset relative to the decl, but do have
> one relative to the field.  adjust_address updates the *last* offset.

I think it'd be useful to have adjust_address update all of the
offsets.  This way we could pre-compute the offsets all the way
up the chain, saving time during alias analysis.

It would also allow us to discover the decl and the decl's offset
after the fact.

> Then the code to check for overlap is basically the same for decls and
> fields: take the offset of the decl or field and add to the offset in the
> memref and see is they confict.  This also handles the case of overlapping
> fields just like we handle overlapping decls.

Seems good.


r~


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