[llvm] [SLP]Represent SLP graph as a tree (PR #126771)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 10:06:44 PST 2025
================
@@ -5951,6 +5985,67 @@ static void combineOrders(MutableArrayRef<unsigned> Order,
}
}
+bool BoUpSLP::isProfitableToReorder() const {
+ constexpr unsigned TinyVF = 2;
+ constexpr unsigned TinyTree = 10;
+ if (VectorizableTree.size() <= TinyTree)
+ return true;
+ if (VectorizableTree.front()->hasState() &&
+ !VectorizableTree.front()->isGather() &&
+ (VectorizableTree.front()->getOpcode() == Instruction::Store ||
+ VectorizableTree.front()->getOpcode() == Instruction::PHI ||
+ (VectorizableTree.front()->getVectorFactor() == TinyVF &&
----------------
alexey-bataev wrote:
Ok, got it, will change it to `<=`
https://github.com/llvm/llvm-project/pull/126771
More information about the llvm-commits
mailing list