[llvm] r335045 - [SLPVectorizer] Remove default OperandValueKind arguments from getArithmeticInstrCost calls (NFC)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 19 06:40:00 PDT 2018
Author: rksimon
Date: Tue Jun 19 06:40:00 2018
New Revision: 335045
URL: http://llvm.org/viewvc/llvm-project?rev=335045&view=rev
Log:
[SLPVectorizer] Remove default OperandValueKind arguments from getArithmeticInstrCost calls (NFC)
The getArithmeticInstrCost calls for shuffle vectors entry costs specify TargetTransformInfo::OperandValueKind arguments, but are just using the method's default values. This seems to be a copy + paste issue and doesn't affect the costs in anyway. The TargetTransformInfo::OperandValueProperties default arguments are already not being used.
Noticed while working on D47985.
Differential Revision: https://reviews.llvm.org/D48008
Modified:
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=335045&r1=335044&r2=335045&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Tue Jun 19 06:40:00 2018
@@ -2372,25 +2372,21 @@ int BoUpSLP::getEntryCost(TreeEntry *E)
return ReuseShuffleCost + VecCallCost - ScalarCallCost;
}
case Instruction::ShuffleVector: {
- TargetTransformInfo::OperandValueKind Op1VK =
- TargetTransformInfo::OK_AnyValue;
- TargetTransformInfo::OperandValueKind Op2VK =
- TargetTransformInfo::OK_AnyValue;
int ScalarCost = 0;
if (NeedToShuffleReuses) {
for (unsigned Idx : E->ReuseShuffleIndices) {
Instruction *I = cast<Instruction>(VL[Idx]);
if (!I)
continue;
- ReuseShuffleCost -= TTI->getArithmeticInstrCost(
- I->getOpcode(), ScalarTy, Op1VK, Op2VK);
+ ReuseShuffleCost -=
+ TTI->getArithmeticInstrCost(I->getOpcode(), ScalarTy);
}
for (Value *V : VL) {
Instruction *I = cast<Instruction>(V);
if (!I)
continue;
- ReuseShuffleCost += TTI->getArithmeticInstrCost(
- I->getOpcode(), ScalarTy, Op1VK, Op2VK);
+ ReuseShuffleCost +=
+ TTI->getArithmeticInstrCost(I->getOpcode(), ScalarTy);
}
}
int VecCost = 0;
@@ -2398,17 +2394,14 @@ int BoUpSLP::getEntryCost(TreeEntry *E)
Instruction *I = cast<Instruction>(i);
if (!I)
break;
- ScalarCost +=
- TTI->getArithmeticInstrCost(I->getOpcode(), ScalarTy, Op1VK, Op2VK);
+ ScalarCost += TTI->getArithmeticInstrCost(I->getOpcode(), ScalarTy);
}
// VecCost is equal to sum of the cost of creating 2 vectors
// and the cost of creating shuffle.
Instruction *I0 = cast<Instruction>(VL[0]);
- VecCost =
- TTI->getArithmeticInstrCost(I0->getOpcode(), VecTy, Op1VK, Op2VK);
+ VecCost = TTI->getArithmeticInstrCost(I0->getOpcode(), VecTy);
Instruction *I1 = cast<Instruction>(VL[1]);
- VecCost +=
- TTI->getArithmeticInstrCost(I1->getOpcode(), VecTy, Op1VK, Op2VK);
+ VecCost += TTI->getArithmeticInstrCost(I1->getOpcode(), VecTy);
VecCost += TTI->getShuffleCost(TargetTransformInfo::SK_Select, VecTy, 0);
return ReuseShuffleCost + VecCost - ScalarCost;
}
More information about the llvm-commits
mailing list