[PATCH] D58238: [DebugInfo] MachineSink: Insert undef DBG_VALUEs when sinking instructions, try to forward copies
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 14 08:44:12 PST 2019
aprantl added inline comments.
================
Comment at: lib/CodeGen/MachineSink.cpp:798
+ // copy. Only forward the copy if the DBG_VALUE operand exactly
+ // matches the copy destination.
+ if (DbgMO.getReg() == DstMO.getReg())
----------------
I may be misunderstanding, but if it isn't a vreg, don't we need to check that there are no defs of the reg in between? Or is this all pre-ra?
================
Comment at: lib/CodeGen/MachineSink.cpp:807
+ } else {
+ DbgMI->getOperand(0).setReg(0);
+ }
----------------
Does this get easier to read if you unconditionally call setReg(0) and then overwrite it in the copy case?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58238/new/
https://reviews.llvm.org/D58238
More information about the llvm-commits
mailing list