[llvm] d4f5f23 - [SLP]Replace more `TTI` with `TTIRef`, NFC.

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 07:54:44 PDT 2021


Author: Alexey Bataev
Date: 2021-04-22T07:53:20-07:00
New Revision: d4f5f23bbbe5729456546a8e87ee29af9ae4db77

URL: https://github.com/llvm/llvm-project/commit/d4f5f23bbbe5729456546a8e87ee29af9ae4db77
DIFF: https://github.com/llvm/llvm-project/commit/d4f5f23bbbe5729456546a8e87ee29af9ae4db77.diff

LOG: [SLP]Replace more `TTI` with `TTIRef`, NFC.

To pacify MSVC buildbots.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 6c35f04674b4..a54a0edd2fd4 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -3589,13 +3589,13 @@ InstructionCost BoUpSLP::getEntryCost(TreeEntry *E) {
     for (const auto &Data : ExtractVectorsTys) {
       auto *EEVTy = cast<FixedVectorType>(Data.first->getType());
       unsigned NumElts = VecTy->getNumElements();
-      if (TTI->getNumberOfParts(EEVTy) > TTI->getNumberOfParts(VecTy))
-        Cost +=
-            TTI->getShuffleCost(TargetTransformInfo::SK_ExtractSubvector, EEVTy,
-                                None, (Data.second / NumElts) * NumElts, VecTy);
+      if (TTIRef.getNumberOfParts(EEVTy) > TTIRef.getNumberOfParts(VecTy))
+        Cost += TTIRef.getShuffleCost(TargetTransformInfo::SK_ExtractSubvector,
+                                      EEVTy, None,
+                                      (Data.second / NumElts) * NumElts, VecTy);
       else
-        Cost += TTI->getShuffleCost(TargetTransformInfo::SK_InsertSubvector,
-                                    VecTy, None, 0, EEVTy);
+        Cost += TTIRef.getShuffleCost(TargetTransformInfo::SK_InsertSubvector,
+                                      VecTy, None, 0, EEVTy);
     }
   };
   if (E->State == TreeEntry::NeedToGather) {


        


More information about the llvm-commits mailing list