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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 06:13:55 PDT 2020


fhahn 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);
+
----------------
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`.


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

https://reviews.llvm.org/D89847



More information about the llvm-commits mailing list