[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
Author: Denis Antrushin <dantrushin at gmail.com>
Date: 2022-06-14 (Tue, 14 Jun 2022)
[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