[PATCH] D59014: [TTI] Enable analysis of clib functions in getIntrinsicCosts. NFCI.
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 08:50:30 PST 2019
SjoerdMeijer added inline comments.
================
Comment at: include/llvm/Analysis/TargetTransformInfo.h:817
+ /// source/destination type and alignment and the number of bytes copied.
+ int getMemcpyCost(const Instruction *I) const;
+
----------------
RKSimon wrote:
> Why do we need to provide individual cost functions like this? Isn't that what getCallCost/getIntrinsicCost are there for?
I thought a separate function would be good so that targets can override it and do their target dependent decision making there, like e.g. checking if source/destinations types are legal or not. But I agree it is probably not strictly necessary, as querying DataLayout here would also be possible.
================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:26
#include "llvm/IR/Type.h"
+#include "llvm/IR/IntrinsicInst.h"
----------------
RKSimon wrote:
> include ordering - clang-format should fix this
Cheers, will look at that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59014/new/
https://reviews.llvm.org/D59014
More information about the llvm-commits
mailing list