Skip to content

Conversation

david-arm
Copy link
Contributor

The operand info argument appears to refer to different things depending upon whether it's a load or a store, so I've clarified this in the documentation.

The operand info argument appears to refer to different things
depending upon whether it's a load or a store, so I've clarified
this in the documentation.
@david-arm david-arm requested a review from fhahn September 4, 2025 12:47
@llvmbot llvmbot added the llvm:analysis Includes value tracking, cost tables and constant folding label Sep 4, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 4, 2025

@llvm/pr-subscribers-llvm-analysis

Author: David Sherwood (david-arm)

Changes

The operand info argument appears to refer to different things depending upon whether it's a load or a store, so I've clarified this in the documentation.


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

1 Files Affected:

  • (modified) llvm/include/llvm/Analysis/TargetTransformInfo.h (+3-1)
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h
index af78e0c1e4799..103e5f949bcc1 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -1533,7 +1533,9 @@ class TargetTransformInfo {
       Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedDstElts,
       TTI::TargetCostKind CostKind) const;
 
-  /// \return The cost of Load and Store instructions.
+  /// \return The cost of Load and Store instructions. The operand info
+  /// \p OpdInfo should refer to the stored value for stores and the address
+  /// for loads.
   LLVM_ABI InstructionCost getMemoryOpCost(
       unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace,
       TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput,

@david-arm david-arm changed the title [Analysis] Improve documentation for getMemoryOpCost [Analysis][NFC] Improve documentation for getMemoryOpCost Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:analysis Includes value tracking, cost tables and constant folding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants