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

Re: PR middle-end/30017 (ICE in C++ size hook)


Andrew Pinski wrote:
> On Sun, 2006-12-03 at 16:54 -0800, Mark Mitchell wrote:
>> For example, if you have "struct S {
>> double d; int i; }", it would be better to copy 12 bytes, not 16, on a
>> 32-bit machine. 
> 
> Well some of the 32-bit targets actually have ways of loading 16-byte
> from memory and storing it.  So I don't think this is a good thing to
> reduce the copy size down to 12 bytes for those targets (I am thinking
> about PPC (VMX), x86 (SSE) and SPU, all have 128-bit registers).  Also
> with most 32-bit targets you can use the floating point registers to
> copy 8-bytes at a time.

Yes, that's true; I didn't mean it to be a rule for all targets.  But,
there certainly are targets where doing a partial copy would be better,
and it might be useful to have this information available.  Then again,
perhaps all we really need is the totally-empty case; that's a very
useful C++ optimization.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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