[PATCH 0/6 v2] PR/63679 Make SRA scalarize constant-pool loads

Alan Lawrence alan.lawrence@arm.com
Thu Oct 29 19:22:00 GMT 2015


This is a revision of previous series at
https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01485.html , and follows on from
the first two patches of that series, which have been pushed already.

A few things have happened since. The previous patch 3, making SRA generate
ARRAY_REFS, is removed. As Martin comments, it seems unfair to make SRA work
around this limitation of DOM, so instead the first two patches extend DOM to
understand this equivalence. Richi suggested that we might want a normalization
pass to convert all ARRAY_REFs to MEM_REFS, and while that would have
advantages, this simpler approach is enough to persuade DOM to optimize the
MEM_REFS produced by SRA with array accesses, even when the vectorizer
intervenes. Moreover we can apply more normalizations in DOM than would be
permissible elsewhere, even if these two patches are only a small step towards
that.

A number of other changes followed, with most problems coming from Ada, specifically on ARM.

I intend to follow up with changes to the heuristics and gimplification code,
moving heuristics from gimplify_init_constructor to SRA, but this series as it
is fixes PR/63679 (with the --param), and it is not certain I will be able to
tackle said heuristics in time for gcc 6.

I've tested each patch (in sequence supplied) with

Bootstrap + check-gcc,g++,ada,fortran on x86_64 and ARM;
Bootstrap + check-gcc,g++,fortran on AArch64.

And also tested that the ssa-dom-cse-2.c scan-tree-dump test is fixed on hppa, ppc64le, sparc, alpha, s390.

Are these OK for trunk?

Cheers, Alan



More information about the Gcc-patches mailing list