[PATCH] D128192: [GlobalISel][DebugInfo] Propagate debug location for localized constants

Vladislav Dzhidzhoev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 10:26:53 PDT 2022


dzhidzhoev added a comment.

In D128192#3680110 <https://reviews.llvm.org/D128192#3680110>, @dblaikie wrote:

> In this case we're talking about dropping the location entirely (that's the current behavior, yes?) - so the only time an instruction like that causes more zero locations, is when it appears at the start of a block

I'm not sure, but it seems to be true.

In D128192#3680110 <https://reviews.llvm.org/D128192#3680110>, @dblaikie wrote:

> so I think backpropagating at the start of a block would address the issue being discussed in this patch.

I can implement that, collect some metrics, but I can't make a decision on this assumption yet. On which stage/pass should such backpropagation happen?

In D128192#3680110 <https://reviews.llvm.org/D128192#3680110>, @dblaikie wrote:

> Other zeros would not appear if the constant is put not at the beginning of a block - those would already be getting flow-on locations from the previous locations in a block.

We can consider this patch as changing a propagation direction for constants. From forward propagation, the default debugger behavior, to backward propagation. I think it affects not only instructions at the beginning of the basic block, since changing the propagation direction may make boundaries between source code lines more precise, and thus, improve stepping behavior (https://github.com/llvm/llvm-project/issues/56370 addressing such cases too).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128192



More information about the llvm-commits mailing list