[PATCH] D57779: [SLP] Add support for throttling.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 18 14:47:01 PDT 2020
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2276
+ struct TreeState {
+ using TreeStateTy = SmallVector<std::unique_ptr<TreeState>, 8>;
+
----------------
dtemirbulatov wrote:
> ABataev wrote:
> > Why need to store a pointer to `TreeState` but the `TreeState` itself?
> TreeState is a large structure, it is convenient with dynamically allocate, but static version might be faster, do you think it is critical?
Reduce the number of the preallocated elements to, say, 2 or 4 and store elements directly.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5151
+ BuiltTrees.erase(llvm::remove_if(BuiltTrees,
+ [&](std::unique_ptr<TreeState> &T) {
+ return T.get() != Tree;
----------------
dtemirbulatov wrote:
> ABataev wrote:
> > `[Tree]`
> Tree is a class property, not a local variable.
Then `[this]`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57779/new/
https://reviews.llvm.org/D57779
More information about the llvm-commits
mailing list