[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:35:28 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) {}
 
----------------
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`.


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

https://reviews.llvm.org/D110623



More information about the llvm-commits mailing list