This is the mail archive of the gcc-bugs@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]

[Bug fortran/31009] Use memcpy when assigning whole arrays



------- 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


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