[PATCH] D31186: Changing TargetTransformInfo::getGEPCost to take GetElementPtrInst as parameter

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 23:39:02 PDT 2017


jonpa added a comment.

>   User stories:
>   
>   An user wants to estimate the cost of an operation to make a decision whether it's worth to create it. The operation does not exist in IR.
>   An user has an operation in IR and wants to know the cost of the operation to estimate its contribution into execution.

I think there is also the case in a vectorizer, where there is an existing instruction but the cost query is for the same instruction *vectorized* with VF.

> Jonas, an optional parameter duplicates the information passed through other parameters. It can provide all of the needed information. Also single API for all use cases might create some kind of misunderstanding.

No, not in the case in the vectorizer. Here the scalar instruction is passed, with vector types.


https://reviews.llvm.org/D31186





More information about the llvm-commits mailing list