[PATCH] D24022: Update the vectorizer cost model for getVectorInstrCost to reflect actual costs of the operations on Power8/Power9
Ehsan Amiri via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 07:21:44 PDT 2016
amehsan added a comment.
I start with comments about the code here and then get to the more general dicussion:
1- Some hardcoded constants represent cost of an operation. For example in line 365 we have
DirectMoveCost + 1
and 1 seems to represent the cost of a swap/permute. There are other places that value of 1 has been used for this cost. We should clearly define a constant equal to one for this cost and use that constant name, like what is done for DirectMoveCost
2- IIUC, there is an implicit assumption here, that the cost of direct move on pwr8 and pwr9 is the same. Is this known for a fact?
As a more general comment:
1- Is there a reason that this function cannot be replaced by a target description file? Apart from the fact, that we need to do extra work to develop code to support defining these cost in td files, is there a fundamental reason that these cannot be defined in td files?
Repository:
rL LLVM
https://reviews.llvm.org/D24022
More information about the llvm-commits
mailing list