On 4/4/07, Andrew Pinski <[EMAIL PROTECTED]> wrote:
On 4/4/07, Zdenek Dvorak <[EMAIL PROTECTED]> wrote:
> Hello,
>
> at the moment, any pass that needs to process memory references are
> complicated (or restricted to handling just a limited set of cases) by
> the need to interpret the quite complex representation of memory
> references that we have in gimple. For example, there are about 1000 of
> lines of quite convoluted code in tree-data-ref.c and about 500 lines in
> tree-ssa-loop-ivopts.c dealing with parsing and analysing memory
> references.
I have my doubts changing this is the correct step forward. Having a
high level representation is a good thing and having it represented as
*(base+offset) (plus other info) might just make the other passes that
like the high level representation get worse.
So we'll fix them.
I also don't see why
tree-data-ref.c and tree-ssa-loop-ivopts.c could not use
get_inner_reference which parses the memory references for you.
Because most of the time, it's not a single expression, but addressing
arithmetic split over multiple statements?
get_inner_reference just doesn't help here at all.
Maybe
I don't see the benifit in always changing our IR without really
thinking about the problem and seeing if there are already tools
(functions) which do the same thing in a common place.
I believe in this case, simplifying our IR to have a single
representation of memory accesses would be a very good thing. It saves
tree codes and simplifies the handling necessary to do good
optimization and data dependence, rather than making it more complex.