[llvm] [SLP]: Introduce and use getDataFlowCost (PR #112999)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 15:35:35 PDT 2024
================
@@ -9075,15 +9075,16 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
auto *FinalVecTy = FixedVectorType::get(ScalarTy, EntryVF);
bool NeedToShuffleReuses = !E->ReuseShuffleIndices.empty();
+ InstructionCost CommonCost = 0;
if (E->State == TreeEntry::NeedToGather) {
if (allConstant(VL))
- return 0;
+ return CommonCost;
if (isa<InsertElementInst>(VL[0]))
return InstructionCost::getInvalid();
- return processBuildVector<ShuffleCostEstimator, InstructionCost>(
- E, ScalarTy, *TTI, VectorizedVals, *this, CheckedExtracts);
+ return CommonCost +
+ processBuildVector<ShuffleCostEstimator, InstructionCost>(
+ E, ScalarTy, *TTI, VectorizedVals, *this, CheckedExtracts);
----------------
alexey-bataev wrote:
Drop all these changes
https://github.com/llvm/llvm-project/pull/112999
More information about the llvm-commits
mailing list