[PATCH] D35888: Changed basic cost of Store operation on X86.
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 11:15:20 PDT 2017
delena added a comment.
In https://reviews.llvm.org/D35888#821581, @eastig wrote:
> Hi Elena,
>
> There is already
>
> /// \return The cost of Load and Store instructions.
> int TargetTransformInfo::getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment,
> unsigned AddressSpace, const Instruction *I = nullptr) const;
>
>
> Maybe it should be updated and used?
We have 2 sets of cost functions in TTI. One set is used by vectorizer in order to compare same operations with different vector types. Vectorizer does not estimate num of UOps, it mostly counts instructions. The second set is getOperationCost() returns TCC_Free/Basic/Expensive and used by Unroller, Inliner and, I think, CFG-simplifiy pass. These 2 sets are not mixed AFAIK.
Repository:
rL LLVM
https://reviews.llvm.org/D35888
More information about the llvm-commits
mailing list