On 10/29/2015 01:18 PM, Alan Lawrence wrote:
This patch just teaches DOM that ARRAY_REFs can be equivalent to MEM_REFs (with
pointer type to the array element type).
gcc/ChangeLog:
* tree-ssa-dom.c (dom_normalize_single_rhs): New.
(dom_normalize_gimple_stmt): New.
(lookup_avail_expr): Call dom_normalize_gimple_stmt.
Has this been tested? Do you have tests where it can be shown to make a
difference independent of the changes to tree-sra.c?
The implementation looks fine, I just want to have some basic tests in
the testsuite that show the benefit of this normalization.
Similarly for patch #2. Interestingly enough we had code that made that
kind of transformation during gimplification eons ago. Presumably it
was ripped out at some point because of the differences in aliasing
properties.
Jeff