]> granicus.if.org Git - llvm/commit
[DebugInfo][DAG] Limit special-casing of dbg.values for Arguments
authorJeremy Morse <jeremy.morse.llvm@gmail.com>
Wed, 13 Feb 2019 13:37:33 +0000 (13:37 +0000)
committerJeremy Morse <jeremy.morse.llvm@gmail.com>
Wed, 13 Feb 2019 13:37:33 +0000 (13:37 +0000)
commite52eea9dbbeacb024dc43e5ea6620d09a75011bb
tree2a99c1a64a71e2f119cbce2d5ccc7ae4f16f8d18
parent259523f75aad17a4d5bf93eff32c1e8dcea62e12
[DebugInfo][DAG] Limit special-casing of dbg.values for Arguments

SelectionDAGBuilder has special handling for dbg.value intrinsics that are
understood to define the location of function parameters on entry to the
function. To enable this, we avoid recording a dbg.value as a virtual register
reference if it might be such a parameter, so that it later hits
EmitFuncArgumentDbgValue.

This patch reduces the set of circumstances where we avoid recording a
dbg.value as a virtual register reference, to allow more "normal" variables
to be recorded that way. We now only bypass for potential parameters if:
 * The dbg.value operand is an Argument,
 * The Variable is a parameter, and
 * The Variable is not inlined.
meaning it's very likely that the dbg.value is a function-entry parameter
location.

Differential Revision: https://reviews.llvm.org/D57584

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353948 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/DebugInfo/X86/dbg-value-arg-movement.ll [new file with mode: 0644]