[PATCH] D110623: [SLP] Avoid calculating expensive spill cost when it is not required
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 28 06:38:31 PDT 2021
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2189-2190
struct BlockScheduling {
- BlockScheduling(BasicBlock *BB)
- : BB(BB), ChunkSize(BB->size()), ChunkPos(ChunkSize) {}
+ BlockScheduling(BasicBlock *BB, BoUpSLP *R)
+ : BB(BB), R(R), ChunkSize(BB->size()), ChunkPos(ChunkSize) {}
----------------
ABataev wrote:
> Not sure it is a good idea to add tree here. Maybe just add an internal flag and update `R->NoCallInst` after scheduling the region, reading the flag from BlockScheduling? or return as one of the results of `BS.tryScheduleBundle`.
Also, maybe it is worth trying to change `BoUpSLP::getSpillCost` too? For example, we can try to calculate `NumCalls` in the scheduling function and avoid doing this in the function `BoUpSLP::getSpillCost`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110623/new/
https://reviews.llvm.org/D110623
More information about the llvm-commits
mailing list