[PATCH] D57584: [DebugInfo][DAG] Reduce SelectionDAGs reordering of variables referring to Arguments

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 4 04:39:07 PST 2019


bjope added a comment.

In D57584#1382939 <https://reviews.llvm.org/D57584#1382939>, @jmorse wrote:

> In D57584#1380829 <https://reviews.llvm.org/D57584#1380829>, @bjope wrote:
>
> > Maybe I was a little bit too quick to say that this solved our problem. Our problem is related to SelectionDAGBuilder::EmitFuncArgumentDbgValue hoiting dbg.value instructions referring to arguments (even if we just use the value from an argument to describe another variable that is assigned later on in the function). We will file a bugzilla ticket for that.
>
>
> It may be that replicating the IsParamOfFunc logic in this change into resolveDanglingDebugInfo resolves that. (I haven't explored doing that yet).


It is more like that we should not do EmitFuncArgumentDbgValue based on that the value originates from a param (since it hoists the DBG_VALUE to the start of the function just because the value is a param, even if the DIVariable that is assigned the value isn't in the scope of the function start). That should only be done if the DIVariable also describes a parameter (and preferably only if it is the same parameter as the value is related to), and probably only for the first occurence of a dbg.value that describes that parameter. I've been experimenting a bit with that. I'll hopefully have something that I can show in a PR/review later today.


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

https://reviews.llvm.org/D57584





More information about the llvm-commits mailing list