[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment
jb at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Apr 29 10:46:00 GMT 2007
------- Comment #4 from jb at gcc dot gnu dot org 2007-04-29 11:46 -------
I don't think you can use memset for populating real arrays except when the
value is 0.0; the bit patterns would be different, as memset takes an int
argument which is actually converted to unsigned char.
AFAIK the libc memset/cpy choose the algorithm depending the the size etc., so
you have to do a big block to make up for all the overhead. But what could be
done for small multidimensional arrays would be to "flatten" the nested loops
into the equivalent 1D loop? Perhaps this is something better done in the
middle end?
--
jb at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jb at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016
More information about the Gcc-bugs
mailing list