diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-06-19 13:40:00 +0000 | 
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-06-19 13:40:00 +0000 | 
| commit | 04613936603503d791705bb0ea7356644f142316 (patch) | |
| tree | 324dabf8c67818398f5e5e1a48e18749560a8ba4 /llvm/lib/Transforms | |
| parent | bb2b00bb80e0646a78847c7d7a916b69f1010f65 (diff) | |
| download | bcm5719-llvm-04613936603503d791705bb0ea7356644f142316.tar.gz bcm5719-llvm-04613936603503d791705bb0ea7356644f142316.zip  | |
[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
llvm-svn: 335045
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 21 | 
1 files changed, 7 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 1e23e706c13..9468223f9e6 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -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;      }  | 

