[PATCH] D98401: [CodeGen] Fix backward copy propagation with -g

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 04:41:41 PDT 2021


lkail added a comment.

In D98401#2619087 <https://reviews.llvm.org/D98401#2619087>, @yshui wrote:

>   renamable $rbx = nuw LEA64r %stack.5.agg.tmp.i, 1, $noreg, 8, $noreg
>   DBG_VALUE $rbp, $noreg, !"this", !DIExpression(), debug-location !293; hot.cpp:0 @[ hot.cpp:84:39 @[ hot.cpp:108:11 ] ] line no:0
>
> Shouldn't the `$rbp` in `DBG_VALUE` be updated as well?

I agreed with @yshui that `DBG_VALUE` should be updated since we want to keep codegen w/o `-g` as consistent as possible.

I think backward propagation is missing tracking dbg values as forward propagation does which uses a `CopyDbgUsers` to achieve.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98401



More information about the llvm-commits mailing list