Vasileios Porpodas via llvm-dev
2022-Jan-27 19:24 UTC
[llvm-dev] [RFC] Spill2Reg: Selectively replace spills to stack with spills to vector registers
Hi Momchil, Spill2Reg definitely adds to the FP context, but I am not sure how it would interact with lazy save/restore. Vasileios On Thu, Jan 27, 2022 at 9:34 AM Momchil Velikov <momchil.velikov at gmail.com> wrote:> It's interesting how this interacts with lazy save/restore of the FP > context across context switches. > > ~chill > -- > Compiler scrub, Arm >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220127/d3eacfcd/attachment.html>
Craig Topper via llvm-dev
2022-Jan-27 20:11 UTC
[llvm-dev] [RFC] Spill2Reg: Selectively replace spills to stack with spills to vector registers
On Thu, Jan 27, 2022 at 11:25 AM Vasileios Porpodas via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi Momchil, > Spill2Reg definitely adds to the FP context, but I am not sure how it > would interact with lazy save/restore. > Vasileios >The XSAVE instructions allow the OS to skip restoring the XMM registers on context switches if they are in their initial state or haven't changed. Spilling to XMM registers will make the registers dirty in more cases than they might have been otherwise. That reminds me that this needs to be disabled when the NoImplicitFloat attribute is present. One use for NoImplicitFloat is to prevent uses of FP and vector registers when compiling OS kernels. If the kernel code doesn't change the FP or vector registers, they don't need to be saved/restored during system calls. I hope you already took into account -mno-sse/-no-sse2. ~Craig> > On Thu, Jan 27, 2022 at 9:34 AM Momchil Velikov <momchil.velikov at gmail.com> > wrote: > >> It's interesting how this interacts with lazy save/restore of the FP >> context across context switches. >> >> ~chill >> -- >> Compiler scrub, Arm >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220127/efe1bc81/attachment.html>