On 05 Jan 2007 07:18:47 -0800, Ian Lance Taylor <[EMAIL PROTECTED]> wrote:
At the tree level, the problem is that the assignment to a[0] is seen
as aliasing a[1].  This causes the use of a[1] to look like a USE of
an SMT, and the assignment to a[0] to look like a DEF of the same
SMT.  So in tree-ssa-loop-im.c the statements look like they are not
loop invariant.

I don't know we can do better with our current aliasing
representation.  Unless we decide to do some sort of array SRA.

Or perhaps we could make the loop invariant motion pass more
complicated: when it sees a use or assignment of a memory tag, it
could explicitly check all the other uses/assignments in the loop and
see if they conflict.  I don't really know how often this would pay
off, though.

How about using dependence analysis instead?


At the RTL level we no longer try to hoist MEM references out of
loops.  We now assume that is handled at the tree level.

We do hoist MEMs out of loops, in gcse.c.

Gr.
Steven

Reply via email to