[all-commits] [llvm/llvm-project] c0e965: [Statepoints] FixupStatepoint: Clear isKill flag i...
dantrushin via All-commits
all-commits at lists.llvm.org
Tue Jun 14 00:53:14 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c0e965e222900e1fdee417a73242e408943d9fb0
https://github.com/llvm/llvm-project/commit/c0e965e222900e1fdee417a73242e408943d9fb0
Author: Denis Antrushin <dantrushin at gmail.com>
Date: 2022-06-14 (Tue, 14 Jun 2022)
Changed paths:
M llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
M llvm/test/CodeGen/X86/statepoint-fixup-copy-prop.mir
Log Message:
-----------
[Statepoints] FixupStatepoint: Clear isKill flag if COPY is not deleted.
When spilling CSRs, FixupStatepoint pass does simple copy propagation,
trying to find COPY instruction which defines register being spilled
and spill COPY source instead. I.e., if we have CSR $x and found
$x = COPY $y
we will spill $y instead.
But we may be unable to delete COPY instruction for some reason.
Then, spill will be inserted after it, adding another use of $y.
If COPY instruction was last use of $y (killed it), after insertion of
the spill it is not, so `isKill` flag must be cleared. We failed to do
so and this patch fixes this issue.
Reviewed By: skatkov
Differential Revision: https://reviews.llvm.org/D127308
More information about the All-commits
mailing list