[PATCH] D70097: [SCEV] Add missing cache queries

Ehud Katz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 04:12:45 PST 2020


ekatz marked 2 inline comments as done.
ekatz added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:2464
+    if (SCEV *S = UniqueSCEVs.FindNodeOrInsertPos(ID, IP))
+      return S;
+  }
----------------
mkazantsev wrote:
> mkazantsev wrote:
> > This is not correct unless you also add no wrap flags into it.
> See how it's done in `getOrCreateAddExpr`.
Will be fixed.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:2946
+  else {
+    FoldingSetNodeID ID;
+    ID.AddInteger(scMulExpr);
----------------
mkazantsev wrote:
> This code piece is reocurring over the code. Please factor out into a separate method that takes `ArrayRef<Value *>` or something.
I'll change it to use `findExistingSCEVInCache` instead.


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

https://reviews.llvm.org/D70097





More information about the llvm-commits mailing list