Skip to content

Commit 273e75e

Browse files
committed
[Analysis] Improve documentation for getMemoryOpCost
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.
1 parent 018dc1b commit 273e75e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/include/llvm/Analysis/TargetTransformInfo.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,9 @@ class TargetTransformInfo {
15331533
Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedDstElts,
15341534
TTI::TargetCostKind CostKind) const;
15351535

1536-
/// \return The cost of Load and Store instructions.
1536+
/// \return The cost of Load and Store instructions. The operand info
1537+
/// \p OpdInfo should refer to the stored value for stores and the address
1538+
/// for loads.
15371539
LLVM_ABI InstructionCost getMemoryOpCost(
15381540
unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace,
15391541
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput,

0 commit comments

Comments
 (0)