LLVM: Stop llvm saving stg caller-save regs across C calls
authorDavid Terei <davidterei@gmail.com>
Mon, 5 Jul 2010 16:26:29 +0000 (16:26 +0000)
committerDavid Terei <davidterei@gmail.com>
Mon, 5 Jul 2010 16:26:29 +0000 (16:26 +0000)
commit0d657c49385c1dd0896c02ae979da4f858c2ceb3
tree06a1ad232f83e4cb5a1c2f14ce495b0e4439f38a
parentfb218a784685dc0452f3e584d238c8db7826d499
LLVM: Stop llvm saving stg caller-save regs across C calls

This is already handled by the Cmm code generator so LLVM is simply
duplicating work. LLVM also doesn't know which ones are actually live
so saves them all which causes a fair performance overhead for C calls
on x64. We stop llvm saving them across the call by storing undef to
them just before the call.
compiler/codeGen/CgUtils.hs
compiler/llvmGen/LlvmCodeGen/CodeGen.hs