[PATCH] D64700: [SLPVectorizer] [NFC] Avoid repetitive calls to getSameOpcode().

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 10:13:27 PDT 2019


RKSimon added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1572
   const TreeEntry *getTreeEntry(Value *V) const {
-    auto I = ScalarToTreeEntry.find(V);
-    if (I != ScalarToTreeEntry.end())
-      return VectorizableTree[I->second].get();
+    auto *I = dyn_cast<Instruction>(V);
+    auto It = ScalarToTreeEntry.find(I);
----------------
dtemirbulatov wrote:
> RKSimon wrote:
> > vporpo wrote:
> > > Same here
> > These NFC changes are still here - remove from this patch?
> hmm, We can refer to an entry by a pointer instead of a number and I prefer to keep it unless the other opinion?
In which case I'd recommend just doing this as a NFC commit now to avoid it from this patch.


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

https://reviews.llvm.org/D64700





More information about the llvm-commits mailing list