[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 04:09:54 PDT 2017


eastig added a comment.

In https://reviews.llvm.org/D35888#821885, @delena wrote:

> 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.


Thank you for clarification. I didn't know about this. It is not clear from the documentation. IMHO these specifics should be reflected at the language level not at the doc level.
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)


Repository:
  rL LLVM

https://reviews.llvm.org/D35888





More information about the llvm-commits mailing list