[PATCH] D28181: [MemDep] NFC walk invariant.group graph only down

Piotr Padlewski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 05:21:27 PST 2017


Prazek added inline comments.


================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:359
   // Queue to process all pointers that are equivalent to load operand.
-  SmallVector<const Value *, 8> LoadOperandsQueue;
-  SmallSet<const Value *, 14> SeenValues;
-  auto TryInsertToQueue = [&](Value *V) {
-    if (SeenValues.insert(V).second)
-      LoadOperandsQueue.push_back(V);
-  };
-
-  TryInsertToQueue(LoadOperand);
+  SmallVector<const Value *, 10> LoadOperandsQueue;
+  LoadOperandsQueue.push_back(LoadOperand);
----------------
Prazek wrote:
> davide wrote:
> > Any reason why did you change the initial size of the `SmallVector`?
> I deleted SmallSet of 14 elements, so I thought I can be more lavish here :)
8 would be probably still enough, I never did any measurements, so if you would like, I can change it back to 8


https://reviews.llvm.org/D28181





More information about the llvm-commits mailing list