[llvm] [TTI] Remove getVPMemoryOpCost. NFC (PR #160838)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 02:18:32 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Luke Lau (lukel97)

<details>
<summary>Changes</summary>

No target implements this and nothing calls it. The cost of vp.load/store/gather/scatter etc. are handled by BasicTTIImpl::getIntrinsicInstrCost which forwards it onto the appropriate TTI::getMemoryOpCost/getGatherScatterOpCost etc.


---
Full diff: https://github.com/llvm/llvm-project/pull/160838.diff


2 Files Affected:

- (modified) llvm/include/llvm/Analysis/TargetTransformInfo.h (-6) 
- (modified) llvm/include/llvm/Analysis/TargetTransformInfoImpl.h (-8) 


``````````diff
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h
index 7a4abe9ee5082..5d3b233ed6b6a 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -1551,12 +1551,6 @@ class TargetTransformInfo {
       OperandValueInfo OpdInfo = {OK_AnyValue, OP_None},
       const Instruction *I = nullptr) const;
 
-  /// \return The cost of VP Load and Store instructions.
-  LLVM_ABI InstructionCost getVPMemoryOpCost(
-      unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace,
-      TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput,
-      const Instruction *I = nullptr) const;
-
   /// \return The cost of masked Load and Store instructions.
   LLVM_ABI InstructionCost getMaskedMemoryOpCost(
       unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace,
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
index 566e1cf51631a..4cd607c0d0c8d 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
@@ -841,14 +841,6 @@ class TargetTransformInfoImplBase {
     return 1;
   }
 
-  virtual InstructionCost getVPMemoryOpCost(unsigned Opcode, Type *Src,
-                                            Align Alignment,
-                                            unsigned AddressSpace,
-                                            TTI::TargetCostKind CostKind,
-                                            const Instruction *I) const {
-    return 1;
-  }
-
   virtual InstructionCost
   getMaskedMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment,
                         unsigned AddressSpace,

``````````

</details>


https://github.com/llvm/llvm-project/pull/160838


More information about the llvm-commits mailing list