[PATCH] D41226: [LiveDebugValues] recognize spilled register that is killed in instruction after the spill
Yifeng Dong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 15 02:07:14 PDT 2021
dongAxis1944 added inline comments.
Herald added a project: LLVM.
================
Comment at: llvm/trunk/lib/CodeGen/LiveDebugValues.cpp:429
- // In a spill instruction generated by the InlineSpiller the spilled register
- // has its kill flag set. Return false if we don't find such a register.
- Reg = 0;
+ auto isKilledReg = [&](const MachineOperand MO, unsigned &Reg) {
+ if (!MO.isReg() || !MO.isUse()) {
----------------
@wolfgangp hello, I have a question about that why the register of MI must be marked, "killed"?
Considering the following case:
```
MOV32mr $rsp, 1, $noreg, 8, $noreg, $r9d :: (store 4 into %stack.3)
...
DBG_VALUE $rsp, 0, !"fuck", !DIExpression(DW_OP_plus_uconst, 8), debug-location !960; llvm-project/build_release/bin/test.cpp:0 line no:14 indirect
...
MOVSDmr $rsp, 1, $noreg, 8, $noreg, killed renamable $xmm0 :: (store 8 into %stack.3)
```
Because the r9d is not marked kill, the LLVM will not know the value of r9d is on %stack.3.
Any ideas?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D41226/new/
https://reviews.llvm.org/D41226
More information about the llvm-commits
mailing list