Subject: Re: port-xen/29887: sysctl kern.consdev coredumps
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 06/17/2005 18:43:45
On Jun 17, 2005, at 4:29 PM, der Mouse wrote:
> Acquiring alignment restrictions, that is *definitely* a bug, to my
> mind. memcpy() as specified does not have alignment restrictions, so
> an inlining of it that does is an invalid transformation - unless the
> compiler can prove those restrictions are always satisfied for that
> particular call.
You have misunderstood what happens in the memcpy() case.... it
inlines when it knows (according to type rules) that the src and dst
are aligned in a certain way, that the (constant) size is within some
threshold, and appropriate instructions are available for performing
the block move in a way that would be cheaper than a function call.