https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016
--- Comment #11 from Thomas Koenig ---
Correction: The rank-1 copying cases are now handled by the middle end,
the two-dimensional case isn't.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016
--- Comment #10 from Thomas Koenig ---
Excellent news: The __builtin_memcpy cases have been fixed in the
meantime, and using __builtin_memset for values of more than one
byte doesn't work.
I will commit a test case and then close.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|tkoenig at gcc do
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016
Eric Botcazou changed:
What|Removed |Added
CC||ebotcazou at gcc dot gnu.org
--- Comment
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016
--- Comment #7 from Tobias Burnus ---
(In reply to Thomas Koenig from comment #6)
> Working on it a little bit.
I believe that the middle end prefers the use of ARRAY_RANGE_REF to the use of
memcpy. The reason is that with ARRAY_RANGE_REF it know
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016
Thomas Koenig changed:
What|Removed |Added
Status|NEW |ASSIGNED
CC|
--- Comment #5 from pinskia at gcc dot gnu dot org 2007-04-30 17:25 ---
> 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 "f
--- 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
--- Comment #3 from tkoenig at gcc dot gnu dot org 2007-03-01 19:34 ---
Confirmed.
--
tkoenig at gcc dot gnu dot org changed:
What|Removed |Added
Status|UNCON
--- Comment #2 from burnus at gcc dot gnu dot org 2007-03-01 19:26 ---
And another example for compile-time known sizes:
subroutine bar(a,n)
implicit none
integer :: n
real :: a(n),b(12)
a(1:12) = b
a(2:n) = b
! Here, n is unknown, but it is only valid if the shapes of b an a are
--- Comment #1 from burnus at gcc dot gnu dot org 2007-03-01 19:15 ---
subroutine bar(a,b,n)
implicit none
integer :: n
real :: a(n,n), b(n,n)
a = b
end subroutine
For that example example, the overhead is even more obvious. One needs to run
only:
for (int i = 0; i < n*n; i++)
a[
11 matches
Mail list logo