[PATCH] D45342: [DebugInfo] Examine all uses of isDebugValue() for debug instructions.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 9 20:08:57 PDT 2018
HsiangKai marked an inline comment as done.
HsiangKai added inline comments.
================
Comment at: llvm/trunk/lib/CodeGen/InlineSpiller.cpp:935
// Debug values are not allowed to affect codegen.
- if (MI->isDebugValue()) {
+ if (MI->isDebugInstr()) {
// Modify DBG_VALUE now that the value is in a spill slot.
----------------
bjope wrote:
> Isn't this is a little bit confusing?
> Calling buildDbgValueForSpill is probably only correct for a DBG_VALUE. So the old check for MI->isDebugValue() is probably more correct (and more future proof).
>
> And then perhaps there should be an assertion like this on line 943 instead:
> ```
> assert(!MI->isDebugInstr() && "Did not expect to find a use in debug instruction that isn't a DBG_VALUE")
> ```
>
I replaced isDebugValue() by isDebugInstr() conservatively. The instructions using Reg should not be DBG_LABEL. I think your opinion is right. I will create a patch to correct it.
Repository:
rL LLVM
https://reviews.llvm.org/D45342
More information about the llvm-commits
mailing list