[PATCH] D98038: [AMDGPU] Fix the dead frame indices during custom spill lowering.
Scott Linder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 9 09:27:24 PST 2021
scott.linder accepted this revision.
scott.linder added a comment.
This revision is now accepted and ready to land.
In D98038#2611266 <https://reviews.llvm.org/D98038#2611266>, @arsenm wrote:
> I'm not sure if replacing with noreg or just erasing the dbg_value is better
The correct thing is to replace the operand with `$noreg`, not delete the `DBG_VALUE`. If we delete the `DBG_VALUE` entirely we may be incorrectly extending the range of an earlier `DBG_VALUE`. For example:
DBG_VALUE $rax, !"var"
...
SPILL %stack.0 <- $rax
DBG_VALUE %stack.0, !"var" ; implicitly "kills" previous DBG_VALUE, "var" now exclusively located in %stack.0
...
CLOBBER $rax
...
If we eliminate the second `DBG_VALUE` we may end up with something like:
DBG_VALUE $rax, !"var"
...
; no implicit "kill"
CLOBBER $rax
... ; now incorrectly describes the location of "var" as $rax even after the clobber
If we just replace the operand, we continue to kill any existing `DBG_VALUE`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98038/new/
https://reviews.llvm.org/D98038
More information about the llvm-commits
mailing list