[PATCH] D80163: [X86][VARARG] Avoid spilling xmm registers for va_start.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 11:00:19 PDT 2020
avl added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ExpandPseudo.cpp:531
+
+ GuardedBlock->addLiveIn(
+ SaveVarargXmmRegsInstr->getOperand(OpndIdx).getReg());
----------------
avl wrote:
> craig.topper wrote:
> > Why do we only add them ass liveins this late? Shouldn't they have been livein when the block was created in the custom inserter?
> Things were done that way(fill liveins when the block was created
> in the custom inserter) in the first version of the fix.
> But it creates new liveness rule for physical registers
> (newly added block should have physical registers in its liveins
> but it is not allowed before regalloc):
>
> https://reviews.llvm.org/D69372?id=227838#change-TJhqJRPUjpDM
>
> So there was a request to do things in other way, not requiring
> to change liveness rule:
>
> https://reviews.llvm.org/D69372#1734756
>
> The solution done in that patch creates a block with SAVE_VARARG_XMM_REGS
> pseudo instruction. That pseudo instruction defines xmm registers
> (used by varargs). After register allocator, SAVE_VARARG_XMM_REGS pseudo
> instruction is expanded to the real copy instructions and put xmm registers
> into the block liveins.
But... Reading this recent comment https://reviews.llvm.org/D80163#2224926 I think I implemented not exactly what was requested. Implementation from this patch does not hide control flow. Would do implementation which will hide control flow.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80163/new/
https://reviews.llvm.org/D80163
More information about the llvm-commits
mailing list