[PATCH] D67556: [ARM][AArch64][DebugInfo] Improve call site instruction interpretation

Nikola Prica via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 08:34:08 PDT 2019


NikolaPrica marked an inline comment as not done.
NikolaPrica added inline comments.


================
Comment at: lib/CodeGen/TargetInstrInfo.cpp:1137-1140
+    // TODO: For now, there is no use of describing the value loaded into the
+    //       register that is also the source registers (e.g. $r0 = add $r0, x).
+    if (DestRegOp->getReg() == SrcRegOp->getReg())
+      return None;
----------------
dstenb wrote:
> Would it be safe to return such values without this check due to the `getNumElements() == 0` check in `collectCallSiteParameters()`? If so, perhaps we should just consider this a limitation in `collectCallSiteParameters()`, and let the hook describe the values even though they currently can't be used by the caller.
It would be safe. `getNumElements() == 0` would cover this case. But I wanted to explicitly document such behaviour in form of code block and TODO.  Although in `describeLoadedValue ()` we choose what we describe it may be better to move such verification to `collectCallSiteParameters ()`?


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

https://reviews.llvm.org/D67556





More information about the llvm-commits mailing list