[LLVMdev] spilling & xmm register usage

Chris Lattner clattner at apple.com
Wed Sep 29 14:16:28 PDT 2010


On Sep 29, 2010, at 11:49 AM, Dale Johannesen wrote:

>> Under linux, the resulting assembly file shows that only registers up to
>> xmm5, while the same command under windows generates assembly that uses
>> all registers up to xmm15 (on the same 64bit Intel Q9550).
>> At the same time, the linux-assembly shows lots and lots of spills and
>> reloads.
> 
> The Win64 calling convention defines XMM6..XMM15 as callee saved, so their values can remain live across the calls.  On Linux all XMM registers are call-clobbered so any live values must be spilled across calls.  That's the basic reason for the difference.  It may be there's something to do to improve the code on Linux, such as scheduling differently, I haven't looked in detail.

Don't we already have splitting around calls for exactly this sort of situation?

-Chris



More information about the llvm-dev mailing list