-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[Analysis][NFC] Improve documentation for getMemoryOpCost #156875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
|
@llvm/pr-subscribers-llvm-analysis Author: David Sherwood (david-arm) ChangesThe 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:
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,
|
fhahn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for clarifying the current behavior!
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/27142 Here is the relevant piece of the build log for the reference |
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.