[PATCH] D35888: Changed basic cost of Store operation on X86.
Evgeny Astigeevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 05:13:18 PDT 2017
eastig added a comment.
In https://reviews.llvm.org/D35888#822557, @delena wrote:
> > What about having getLoadCost? I think there will be a reasonable question why there is getStoreCost but no getLoadCost.
> > Or can we have the overloaded version of TargetTransformInfo::getMemoryOpCost:
> >
> > int TargetTransformInfo::getMemoryOpCost(const Instruction *I)
>
> I don't think that we want to extend interface without any special need. Load is 1 Uop on X86, and, probably, on other targets, so everyone is happy with the common getOperatopnCost().
Maybe I am wrong but the instruction cost is the cost relative to the cost of a typical instruction. TTI does not operates in terms of microarchitecture: u-ops etc. Why do we need a general function which is only for X86? How will other architectures need it? If everyone is happy with getOperationCost why X86 is not? Is it possible to have this functionality in X86TTI without changing general TTI?
BTW ARM has LDM/STM (load and store multiple instructions) which can be quite heavy comparing to a typical instruction.
Repository:
rL LLVM
https://reviews.llvm.org/D35888
More information about the llvm-commits
mailing list