We have been using LLVM 3.1 to support JITing of AVX. From dumping the MC generating by the MCJIT I noticed it always emits 'VZEROUPPER' to clear the high 128 bit before calling another function. In some cases I know the function called either only use AVX or does not use SSE. I will like to inform the backend it is safe not to emit that instruction. Have not been able to figure out how to do that. Any suggestion will be greatly appreciated. Ciao. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121107/ba1c261e/attachment.html>
On Wed, Nov 7, 2012 at 12:19 PM, Manny Ko <Manny.Ko at imgtec.com> wrote:> We have been using LLVM 3.1 to support JITing of AVX. From dumping the MC > generating by the MCJIT I noticed it always emits ‘VZEROUPPER’ to clear the > high 128 bit before calling another function. In some cases I know the > function called either only use AVX or does not use SSE. I will like to > inform the backend it is safe not to emit that instruction. > > > > Have not been able to figure out how to do that. > > > > Any suggestion will be greatly appreciated.I don't think there's any way at the moment. The relevant function is VZeroUpperInserter::processBasicBlock; we could possibly special case certain calls (maybe based on the calling convention?). -Eli
Seemingly Similar Threads
- [LLVMdev] Proposal to improve vzeroupper optimization strategy
- [LLVMdev] Proposal to improve vzeroupper optimization strategy
- [LLVMdev] AVX calling convention?
- [LLVMdev] [Proposal] function attribute to reduce emission of vzeroupper instructions
- [LLVMdev] use AVX automatically if present