[PATCH] D100952: [TTI] NFC: Change getVectorSplitCost to return InstructionCost

Daniil Fukalov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 06:40:13 PDT 2021


dfukalov created this revision.
dfukalov added reviewers: sdesmalen, rampitec.
Herald added subscribers: kerbowa, hiraditya, nhaehnle, jvesely, arsenm.
dfukalov requested review of this revision.
Herald added a project: LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100952

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


Index: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
+++ llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
@@ -197,7 +197,7 @@
       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,
Index: llvm/include/llvm/CodeGen/BasicTTIImpl.h
===================================================================
--- llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -2087,7 +2087,7 @@
     return RedCost + MulCost + ExtCost;
   }
 
-  unsigned getVectorSplitCost() { return 1; }
+  InstructionCost getVectorSplitCost() { return 1; }
 
   /// @}
 };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100952.339216.patch
Type: text/x-patch
Size: 996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210421/65ee0a2d/attachment.bin>


More information about the llvm-commits mailing list