[llvm-commits] some thoughts on lowering for calling conventions

Bob Wilson bob.wilson at apple.com
Wed Oct 13 12:30:25 PDT 2010


On Oct 13, 2010, at 11:47 AM, Eric Christopher wrote:

>> 
>> The recent discussion about va_arg got me thinking that this might
>> also be a good example of a case where some optimizations want the
>> high level view and then some others want a lower level one. For
>> example
>> 
>> *) determining if we need or not to spill xmm registers is better done
>> with the va_arg in place
>> *) optimizing the pointer computations is better done once it is expanded
>> 
>> If the target specific IL pass is put in between the two it looks like
>> we can get the both. The only slightly tricky part is how to propagate
>> the "don't spill xmm" info. Would this be a good use of metadata? It
> 
> Another couple of things:
> 
> a) do we inline this function? Let's say we split up every double argument to 
> float or i32, then we've just doubled the argument list for something that took
> 3 doubles; now it takes 6 args.  This will likely wreak some havoc with the
> inliner.
> 
> Then if we do inline, what do we do with the arguments? We've already split
> them, now we really want to put them back together for the optimizations, etc.

I expressed the same concern earlier.  At the time, I asked for some data showing that splitting up i64 arguments in the front-end leads to better code. Do you have any numbers, Rafael?



More information about the llvm-commits mailing list