[PATCH] D112516: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 26 11:22:51 PDT 2021


reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:6631
   for (auto *S : Ops)
-    pushOp(S);
+    if (Visited.insert(S).second)
+      Worklist.push_back(S);
----------------
We loose the exit-early with huge operand behavior here.  


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:6643
+      collectUniqueOps(S, Ops);
+      for (auto *Op : Ops)
+        // Threshold of 30 here is arbitrary.
----------------
Please back out the pushOp inlining and just call it here.  


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

https://reviews.llvm.org/D112516



More information about the llvm-commits mailing list