[Inline Spiller] Extend the snippet by statepoint uses
authorSerguei Katkov <serguei.katkov@azul.com>
Thu, 20 Oct 2022 05:05:33 +0000 (12:05 +0700)
committerSerguei Katkov <serguei.katkov@azul.com>
Mon, 9 Jan 2023 06:30:57 +0000 (13:30 +0700)
commitfd64bd94eda0b93c2fb95e048e7919832f72a1cd
tree9ab25d12e477509a30bcabb647c4df854bb358de
parent323782f6f1a7a41466714365aeeec86efe0e534c
[Inline Spiller] Extend the snippet by statepoint uses

Snippet is a tiny live interval which has copy or fill like def
and copy or spill like use at the end (any of them might abcent).

Snippet has only one use/def inside interval and interval is located
in one basic block.

When inline spiller spills some reg around uses it also forces the
spilling of connected snippets those which got by splitting the
same original reg and its def is a full copy of our reg or its
last use is a full copy to our reg.

The definition of snippet is extended to allow not only one use/def
but more. However all other uses are statepoint instructions which will
fold fill into its operand. That way we do not introduce new fills/spills.

Reviewed By: qcolombet, dantrushin
Differential Revision: https://reviews.llvm.org/D138093
llvm/include/llvm/CodeGen/StackMaps.h
llvm/lib/CodeGen/InlineSpiller.cpp
llvm/lib/CodeGen/StackMaps.cpp
llvm/test/CodeGen/AArch64/regalloc-last-chance-recolor-with-split.mir
llvm/test/CodeGen/X86/statepoint-ra.ll
llvm/test/CodeGen/X86/statepoint-split-single-block.ll