[Bug fortran/31009] Use memcpy when assigning whole arrays
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 2 10:43:00 GMT 2007
------- Comment #5 from burnus at gcc dot gnu dot org 2007-03-02 10:43 -------
> Tobias, do the cases given in PR31016 include the one above?
> If yes, this PR could be closed as dupe?!
Actually not. PR 31016 (and related PR 31014) are about cases where one
actually knows that the memory is contiguous (with the size known either at
compile time or only at run time). There using memcpy or memset should always
be a win (except, maybe, for a one-element array).
This PR is about cases were the memory might not be contiguous; thus one needs
create code for both the contiguous and non-contiguous case and a check whether
either case is present. I believe this needs some thinking (and testing) to
make sure that the size of the generated code does not increase too much (at
least not for -Os) and that it is an overall gain without loosing to much speed
for real-world code with on non-contiguous arrays (strides).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31009
More information about the Gcc-bugs
mailing list