[PATCH] D129636: Fix a LSR debug invariance issue
Markus Lavin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 06:20:42 PDT 2022
markus added a comment.
In D129636#3648003 <https://reviews.llvm.org/D129636#3648003>, @jmorse wrote:
> Thanks for hunting this down, caching layers affecting codegen sounds hard to debug.
>
> I'm no SCEV expert, so a couple of possibly obvious questions:
>
> - Is it safe to store the SCEV* for a Value that's then forgotten?
> - Is there a risk that the presence of debug-info will now cause a SCEV to be forgotten that _should_ have been remembered, because of unconditionally forgetting a SCEV if it's used by debug-info?
Unsure and possibly :) I am hoping that the other reviewers will bring some clarity to these questions.
For the first question about storing a SCEV I know there was a lot of discussion about that when I did the original patch some years ago (D87494 <https://reviews.llvm.org/D87494> and D91711 <https://reviews.llvm.org/D91711>) but since then that was fixed and it has afterwards been completely rewritten so not sure what the status is now.
For the second point maybe `ScalarEvolution::getExistingSCEV()` could be used to see if this SCEV existed before analyzing the `dbg.value` or not so that we don't end up forgetting about values that we would not forget about hadn't it been for the `dbg.value`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129636/new/
https://reviews.llvm.org/D129636
More information about the llvm-commits
mailing list