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/31016] Use __buildin_memcpy and __memcpy for array assignment



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


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