[llvm] [TTI] Add cost kind to getAddressComputationCost(). NFC. (PR #153342)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 13 16:52:39 PDT 2025


================
@@ -1680,9 +1680,9 @@ class TargetTransformInfo {
   /// function. \p SE holds the pointer for the scalar evolution object which
   /// was used in order to get the Ptr step value. \p Ptr holds the SCEV of the
   /// access pointer.
-  LLVM_ABI InstructionCost
-  getAddressComputationCost(Type *PtrTy, ScalarEvolution *SE = nullptr,
-                            const SCEV *Ptr = nullptr) const;
+  LLVM_ABI InstructionCost getAddressComputationCost(
+      Type *PtrTy, ScalarEvolution *SE = nullptr, const SCEV *Ptr = nullptr,
+      TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput) const;
----------------
ElvisWang123 wrote:

Actually only one user will use the default value of the costkind. Removed all default in the `getAddressComputationCost()` in [55688a7](https://github.com/llvm/llvm-project/pull/153342/commits/55688a7048426bd7704284f015f19014bccc07d9).

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


More information about the llvm-commits mailing list