[PATCH] D56151: [DebugInfo] PR40010: Avoid register coalesing altering DBG_VALUE valuations
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 31 14:34:00 PST 2018
vsk added a comment.
Thanks for working on this.
As you pointed out in llvm.org/PR40010, we do have a general problem of leaving around DBG_VALUE instructions which should be dead/undef but aren't. Do you think it would be possible/worthwhile to diagnose this issue in MachineVerifier?
================
Comment at: lib/CodeGen/RegisterCoalescer.cpp:1895
+ SmallVector<MachineInstr *, 4> DbgValuesToChange;
+ for (MachineRegisterInfo::reg_instr_iterator
+ I = MRI->reg_instr_begin(CP.getSrcReg()),
----------------
Using MachineRegisterInfo::reg_instructions might aid readability here. Any reason not to?
================
Comment at: lib/CodeGen/RegisterCoalescer.cpp:1901
+ if (UseMI->isDebugValue() && UseMI->getOperand(0).isReg() &&
+ TargetRegisterInfo::isVirtualRegister(CP.getDstReg()) &&
+ mergingChangesDbgValue(UseMI, LIS->getInterval(CP.getDstReg())))
----------------
Could you explain why it's sufficient to fix up coalescer pairs in which the destination is a vreg?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56151/new/
https://reviews.llvm.org/D56151
More information about the llvm-commits
mailing list