[PATCH] D107016: [DebugInfo][LoopStrengthReduction] Ensure restoration of cached DIExpression when using SCEV-based salvaging

Chris Jackson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 19 05:15:35 PDT 2021


chrisjackson abandoned this revision.
chrisjackson added a comment.

:Aah, so on closer inspection and attempting to fix the test, I observed the calls to applyExprToDbgValues() and found:

  RecoverValue.applyExprToDbgValue(*CachedDVI.DVI, CachedDVI.Expr);

which means that in fact it is not necessary to reapply the cached DIExpression, as any expression created by LSR is not used at all to construct the final expression. The setFinalExpression() functions prepend the new expression to the pre-LSR cached expression and this is applied to the dbg.value directly, without considering what the dbg.value's current expression is.
I will abandon this revision as unnecessary. Thanks for the reviews and apologies that this turned out to be an unnecessary change. However, not all effort was wasted as I did identify that sometimes undef values in SCEVs are being used to construct dbg.values that will be alter stripped, so the work on this patch will result in a change.


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

https://reviews.llvm.org/D107016



More information about the llvm-commits mailing list