[PATCH] D26389: [SCEV] limit recursion depth of CompareSCEVComplexity
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 10:13:29 PST 2016
sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: lib/Analysis/ScalarEvolution.cpp:704
+
+ SmallSet<std::pair<const SCEV *, const SCEV *>, 8> EqCache;
if (Ops.size() == 2) {
----------------
IMO a slightly better pattern would have been to have `EqCache` be a `SmallSet` of `std::pair<PointerUnion<Value *, const SCEV *>, PointerUnion<Value *, const SCEV *>>` and to re-use the same cache in `CompareValueComplexity`.
If you agree, can you do that as a followup change?
https://reviews.llvm.org/D26389
More information about the llvm-commits
mailing list