[PATCH] D68973: WIP: [LiveDebugValues] Support the debug entry values for modified parameters

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 05:20:24 PDT 2019


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


================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:2471
 
+  ///  Return whether this is an operation with a constant offset.
+  bool isOpWithOffset() const;
----------------
aprantl wrote:
> aprantl wrote:
> > This doesn't seem to be a good API. I think this is supposed to recognize some specific high-level pattern, but doesn't really say so? Given how easily salvageDebugInfo keeps appending operations to DIExpressions, it seems very unlikely that this condition would be hit very often.
> > 
> > What's the use-case for this, and is there a better way to achieve the same result?
> I.e., were are these expressions produced that we can be sure that we will recognize them with this function?
Thanks for the comments! We are on the same page with this, that is why I left it as a 'WIP'. :)

>From very high level, we want to recognize (simple) modifications of a parameter that could be expressed in terms of its entry value. By looking at the test provided, the problem is we have only the `DBG_VALUE` describing the modification (made from the `Salvage Debug Info` since the `add` instruction was deleted during the `Combine redundant instructions` pass). I am not sure if we should be aware what was the actual modification, we could just see if the `DBG_VALUE` register location is the same as the entry value and apply the `DIExpression` ops on to the entry value expression. I will examine that in details and be back with more info.


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

https://reviews.llvm.org/D68973





More information about the llvm-commits mailing list