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: [RFC] Change (flatten) representation of memory references


Hi,

> I thought about the invariant addresses again (that we allow
> &a[5] as is_gimple_min_invariant) and came to the conclusion that
> rather than allowing a nesting of POINTER_PLUS_EXPR <ADDR_EXPR <a>, 5>
> as invariant we'd extend ADDR_EXPR to adjust the address by an offset,
> making all MEM_REF, INDIRECT_MEM_REF, POINTER_PLUS_EXPR and ADDR_EXPR
> "symmetric".
> 
> With that addition I wrote up http://gcc.gnu.org/wiki/MemRef
> 
> Requests for additions/clarifications welcome.

it would be nice if IDX_EXPR also kept track of the bounds of the index
(i.e., two additional fields).  The proposal mentions keeping
"persistent value range information for i" -- I am not quite sure what
that is supposed to mean?

Also, something should be said about the order of the indices -- is it
allowed to reassociate IDX_EXPRs?  Is it allowed to access the same
array with several different steps (IIRC, fortran frontend does some
such trick to implement transposition of an array)?

What about the indices whose value is a constant?  These can be
moved to offset, but that makes dependency analysis harder, so perhaps
it would make sense to make this lowering only after loop optimizations?

Zdenek


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