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

Zhiwei Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 03:46:28 PST 2021


condy 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?

Idealy the `DBG_VALUE $rbp`   should be removed since the use of `$rbp` is eliminated via `machine-cp`.
But I notice that even `DBG_VALUE $rbp` instruction retains, there is no formal parameter `$rbp` in DWARF output. I guess the debug info module handles such a case.


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