[llvm-commits] [llvm-gcc-4.2] r46157 - in /llvm-gcc-4.2/trunk/gcc/config/i386: llvm-i386-target.h llvm-i386.cpp

2008-01-17 Thread Evan Cheng
Author: evancheng Date: Thu Jan 17 19:47:03 2008 New Revision: 46157 URL: http://llvm.org/viewvc/llvm-project?rev=46157&view=rev Log: Do not pass zero sized array, struct, or class using byval attribute. This is true on both x86-32 and x86-64. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llv

Re: [llvm-commits] [llvm-gcc-4.2] r46157 - in /llvm-gcc-4.2/trunk/gcc/config/i386: llvm-i386-target.h llvm-i386.cpp

2008-01-18 Thread Duncan Sands
Hi Evan, > Do not pass zero sized array, struct, or class using byval attribute. This is > true on both x86-32 and x86-64. is this because LLVM can't handle it, or is it an optimization? If LLVM can't handle passing zero-sized objects using byval, that sounds like a bug... Thanks, Duncan.

Re: [llvm-commits] [llvm-gcc-4.2] r46157 - in /llvm-gcc-4.2/trunk/gcc/config/i386: llvm-i386-target.h llvm-i386.cpp

2008-01-18 Thread Duncan Sands
Hi Evan, > It's for ABI compatibility reason. Also, it makes sense. presumably this results in the parameter being dropped? If so, the LLVM codegenerators could do that too. And either they should, or the verifier should check for this case. Ciao, Duncan.

Re: [llvm-commits] [llvm-gcc-4.2] r46157 - in /llvm-gcc-4.2/trunk/gcc/config/i386: llvm-i386-target.h llvm-i386.cpp

2008-01-18 Thread Evan Cheng
It's for ABI compatibility reason. Also, it makes sense. Evan On Jan 18, 2008, at 1:39 AM, Duncan Sands wrote: > Hi Evan, > >> Do not pass zero sized array, struct, or class using byval >> attribute. This is true on both x86-32 and x86-64. > > is this because LLVM can't handle it, or is it an