[TTI] NFC: Change getVectorSplitCost to return InstructionCost
authordfukalov <daniil.fukalov@amd.com>
Wed, 21 Apr 2021 13:38:53 +0000 (16:38 +0300)
committerdfukalov <daniil.fukalov@amd.com>
Wed, 21 Apr 2021 14:32:02 +0000 (17:32 +0300)
This patch migrates the TTI cost interfaces to return an InstructionCost.

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D100952

llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h

index adf1fb8..0be1845 100644 (file)
@@ -2087,7 +2087,7 @@ public:
     return RedCost + MulCost + ExtCost;
   }
 
-  unsigned getVectorSplitCost() { return 1; }
+  InstructionCost getVectorSplitCost() { return 1; }
 
   /// @}
 };
index 03f7374..e4e816a 100644 (file)
@@ -197,7 +197,7 @@ public:
       std::function<void(Instruction *, unsigned, APInt, APInt &)>
           SimplifyAndSetOp) const;
 
-  unsigned getVectorSplitCost() { return 0; }
+  InstructionCost getVectorSplitCost() { return 0; }
 
   InstructionCost getShuffleCost(TTI::ShuffleKind Kind, VectorType *Tp,
                                  ArrayRef<int> Mask, int Index,