[PATCH] D58042: [LiveDebugValues] Emit parameter's entry value

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 03:02:03 PDT 2019


dstenb added a comment.

In D58042#1571079 <https://reviews.llvm.org/D58042#1571079>, @djtodoro wrote:

> @dstenb  We could land this right now, and the patch for the 'llvm-dwarfdump' stats could be a separate patch. Do you agree?


Yes, that sounds good to me!



================
Comment at: lib/CodeGen/LiveDebugValues.cpp:169
+        if (Kind != EntryValueKind)
+          Kind = RegisterKind;
         Loc.RegNo = RegNo;
----------------
djtodoro wrote:
> dstenb wrote:
> > djtodoro wrote:
> > > aprantl wrote:
> > > > This looks dangerous.. are entry values somehow implicitly also register values? Iguess besed on the other patches the answer is yes, but that also means that we must `assert((!EntryValueKind || RegNo) && "entry values must be register locations")`
> > > Yes, you are right! Thanks!
> > I think this should be `Kind != EntryValueKind`?
> Oh, nice catch! Thanks!
Also, I think we want to move the assertion out of this if statement? We want the check for all types of operands, not just for those that we have seen are register. (Currently, the `RegNo` check, with the assertion placed inside that if statement should mean that the assert can never fail.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58042/new/

https://reviews.llvm.org/D58042





More information about the llvm-commits mailing list