[PATCH] D43956: [DebugInfo] Discard invalid DBG_VALUE instructions in LiveDebugVariables

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 09:18:05 PST 2018


bjope added a comment.

I'm having some problems with replacing the location for the DBG_VALUE that should be discarded by `%noreg`.
If I do that, then the UserValue created in `LDVImpl::handleDebugValue` will get a location that has the `UndefLocNo`.
However, after collectDebugValues we do computeIntervals, and in UserValue::computeIntervals there is a loop that discards all undefs. So there is really no point in adding them? The result will be the same as in my original patch.

But maybe it is a bug that LiveDebugVariables removes all `DBG_VALUE undef, ...`?

If I simply replace the DBG_VALUE by `DBG_VALUE %noreg, ...` and leave it in the code during register allocation, then it has an impact codegen (might be another bug in the register allocator?), but it is also different from having such DBG_VALUE instruction in the input to LiveDebugVariables (the remove before regalloc phase).


Repository:
  rL LLVM

https://reviews.llvm.org/D43956





More information about the llvm-commits mailing list