[PATCH] D129636: Fix a LSR debug invariance issue
Chris Jackson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 04:12:16 PDT 2022
chrisjackson added a comment.
I'm looking at the forgetValue() implementation. I think that as long as the SCEV for the value is preserved and accessable in SalvageDVI() then all is well in terms of the salvaging method.
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?
I think the second point is the crux here. Perhaps there is a way to test if the SCEV already exists, then call forget conditionally.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129636/new/
https://reviews.llvm.org/D129636
More information about the llvm-commits
mailing list