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

Eric Christopher echristo at apple.com
Wed Oct 13 11:47:03 PDT 2010


> 
> 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.

-eric





More information about the llvm-commits mailing list