[PATCH] D89847: [SCEV] Drop cached ranges of AddRecs after flag update

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 04:05:07 PDT 2020


mkazantsev added inline comments.


================
Comment at: llvm/include/llvm/Analysis/ScalarEvolution.h:1491
+  /// Update no-wrap flags of an AddRec.
+  void setNoWrapFlags(SCEVAddRecExpr *AddRec, SCEV::NoWrapFlags Flags);
+
----------------
fhahn wrote:
> Is there a reason we don't do that for all SCEV expressions with wrapping flags? Might be good to document that this also invalidates cached info for AddRec, if it updates the flags and this should be use d from inside SE instead of `AddRec->setNoWrapFlags`. Not sure if there's a nice way to enforce users in SE to use `SE::setNoWrapFlags`.
Sure, it can be done for adds/muls too. Can do as follow-up.


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

https://reviews.llvm.org/D89847



More information about the llvm-commits mailing list