On 10/11/2011 01:40 PM, Richard Guenther wrote:
The pattern matching is still very ad-hoc and doesn't consider
statements that feed the base address.  There is conceptually
no difference between p->a[n] and *(p + n * 4).  You placed this
lowering in reassoc to catch CSE opportunities with DOM, right?
Does RTL CSE not do it's job or is the transform undone by
fwprop before it gets a chance to do it?

The idea (with the patch CSE I sent William) is that fwprop will try to be as greedy as possible, within the bounds of addresses allowed by the target. Then CSE will fix the cases where fwprop could only do half of the job (and hopefully, scheduling will produce good code even when CSE chooses to go back to simple addressing modes).

If I understand correctly, these reassociations are all working on addressing modes that the target does not support, hence they fall outside the scope of both fwprop and CSE.

Paolo

Reply via email to