[PATCH] D64700: [SLPVectorizer] [NFC] Avoid repetitive calls to getSameOpcode().
Dinar Temirbulatov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 15:47:56 PDT 2019
dtemirbulatov marked 2 inline comments as done.
dtemirbulatov added inline comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1520
TreeEntry *newTreeEntry(ArrayRef<Value *> VL, bool Vectorized,
- const EdgeInfo &UserTreeIdx,
+ InstructionsState *S, const EdgeInfo &UserTreeIdx,
ArrayRef<unsigned> ReuseShuffleIndices = None,
----------------
vporpo wrote:
> I was under the impression that we are completely removing InstructionsState and replacing it with state from TreeEntry.
yes, I think the same.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1564
TreeEntry *getTreeEntry(Value *V) {
- 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);
----------------
vporpo wrote:
> Hmm isn't this an unrelated change to this patch?
Hmm, I noticed that @ABataev in D57059 uses Value* to UndefValue to handle empty operations and I think now that ScalarToTreeEntry should be Value* type key as it is now, so we don't need change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64700/new/
https://reviews.llvm.org/D64700
More information about the llvm-commits
mailing list