This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SRA and MOVE_RATIO


Hello,

the tree-ssa/sra-1.c test case is failing on s390 because
SRA deliberately decides to use block-copy to copy the
aggregate, and thus fails to perform some follow-on
optimizations later.

This is because this test:

          /* If the structure is small, and we've made copies, go ahead
             and instantiate, hoping that the copies will go away.  */
          if (full_size <= (unsigned) MOVE_RATIO * UNITS_PER_WORD
              && elt->n_copies > elt->n_uses)
            use_block_copy = false;

which succeeds on many other platforms for a struct of size 16 bytes,
fails on s390 which leaves MOVE_RATIO at its default value of 2.

We don't define MOVE_RATIO because we do define MOVE_BY_PIECES,
and in any case it is true that we have quite efficient memory-
to-memory move instructions even for small blocks.

Why is sra using MOVE_RATIO here in the first place?  The 
documentation of the target macro doesn't say anything about
that ...

Anyway, any suggestions how to fix this FAIL on s390?  I see
several options:
- XFAIL the test case
- use a smaller structure in the test case
- define MOVE_RATIO on s390 (can this have adverse effects?)
- modify sra to no longer use MOVE_RATIO (how?)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]