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

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 04:29:21 PDT 2019


djtodoro marked an inline comment as done.
djtodoro added a comment.

> Yes, that sounds good to me!

@dstenb Thanks!



================
Comment at: lib/CodeGen/LiveDebugValues.cpp:169
+        if (Kind != EntryValueKind)
+          Kind = RegisterKind;
         Loc.RegNo = RegNo;
----------------
dstenb wrote:
> 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.)
Yes, it will never fail.
Also, the code looks much cleaner right now! Thanks!


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

https://reviews.llvm.org/D58042





More information about the llvm-commits mailing list