[PATCH] D105020: [SLP]Improve graph reordering.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 9 08:45:56 PDT 2021
RKSimon added a comment.
A few minors things I've noticed so far. It looks like there's some renaming / nfc(ish) refactoring in here - if that could be pre-committed to reduce the size of this patch it'd be very welcome!
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:592
+ assert(!Mask.empty() && "Expected non-empty mask.");
+ SmallVector<Value *> Prev(Scalars.size());
+ Prev.swap(Scalars);
----------------
Do we need a default value for vector?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2543
+ bool IsIdentity = true;
+ SmallVector<unsigned> Prev(Order.size());
+ Prev.swap(Order);
----------------
Do we need a default value for vector?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2547
+ Order[Mask[Prev[I]]] = I;
+ IsIdentity &= I == Order[I];
+ }
----------------
Doesn't the IsIdentity pass have to be done after Order[] is updated?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2559
+ "Expected non-empty mask and reuses mask.");
+ SmallVector<int> Prev(Reuses.size());
+ Prev.swap(Reuses);
----------------
Do we need a default value for vector?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105020/new/
https://reviews.llvm.org/D105020
More information about the llvm-commits
mailing list