[PATCH] D122945: [debug-info] As an NFC commit, refactor EmitFuncArgumentDbgValue so that it can be extended to support llvm.dbg.addr.

Michael Gottesman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 16:05:29 PDT 2022


gottesmm created this revision.
gottesmm added a reviewer: aprantl.
Herald added a subscriber: hiraditya.
Herald added a project: All.
gottesmm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The reason why I am making this change is that before this commit,
EmitFuncArgumentDbgValue relied on a boolean flag IsDbgDeclare both to signal
that a DBG_VALUE should be made to be indirect /and/ that the original intrinsic
was a dbg.declare. This is no longer always true if we add support for handling
dbg.addr since we will have an indirect DBG_VALUE that is a different intrinsic
from dbg.declare.

With that in mind, in this NFC patch, we prepare for future fixes by introducing
a 3 case-enum argument to EmitFuncArgumentDbgValue that allows the caller to
explicitly specify how the argument's DBG_VALUE should be emitted. This then
allows us to turn the indirect checks into a != FuncArgumentDbgValueKind::Value
and prepare us for a future where we add support here for llvm.dbg.addr
directly.

rdar://83957028


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122945

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122945.419882.patch
Type: text/x-patch
Size: 5955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220401/128aca86/attachment.bin>


More information about the llvm-commits mailing list