[PATCH] D129636: Fix a LSR debug invariance issue
Chris Jackson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 4 02:37:52 PDT 2022
chrisjackson added a comment.
In D129636#3696750 <https://reviews.llvm.org/D129636#3696750>, @fhahn wrote:
> I think I am missing some context here, but this looks a bit suspicious. I am not sure if exposing and checking whether a SCEV exists is the right way to go.
>
> IIUC the main issue seems to be that we try to create SCEVs for all dbg intrinsics? Would it be possible to instead only get SCEV expressions for values we really need (that/s the induction variable I assume, for which there already should be SCEV expression)?
It is necessary to obtain SCEVs for all the values used in dbg.value within the loop, as LSR may optimise out these values and these are salvaged by generating a DWARF expression from the SCEV expression. For further explanation see:
D105207 <https://reviews.llvm.org/D105207> and the EuroLLVM2022 talk on the method here :SCEV-Based debuginfo salvaging in Loop Strength Reduction <https://llvm.org/devmtg/2022-05/>.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129636/new/
https://reviews.llvm.org/D129636
More information about the llvm-commits
mailing list