]> granicus.if.org Git - llvm/commit
[LV] Move getScalarizationOverhead and vector call cost computations to CM. (NFC)
authorFlorian Hahn <flo@fhahn.com>
Wed, 15 May 2019 10:05:49 +0000 (10:05 +0000)
committerFlorian Hahn <flo@fhahn.com>
Wed, 15 May 2019 10:05:49 +0000 (10:05 +0000)
commit75b2eadb06abbc29db94691089f4dbcb50ba1f7f
tree32331eaca50cdf7a881dbe089c4dfd727328f59b
parentdef5cb78d01ce6ef72e47471ca4d7322f7a2db56
[LV] Move getScalarizationOverhead and vector call cost computations to CM. (NFC)

This reduces the number of parameters we need to pass in and they seem a
natural fit in LoopVectorizationCostModel. Also simplifies things for
D59995.

As a follow up refactoring, we could only expose a expose a
shouldUseVectorIntrinsic() helper in LoopVectorizationCostModel, instead
of calling getVectorCallCost/getVectorIntrinsicCost in
InnerLoopVectorizer/VPRecipeBuilder.

Reviewers: Ayal, hsaito, dcaballe, rengolin

Reviewed By: rengolin

Differential Revision: https://reviews.llvm.org/D61638

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360758 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
lib/Transforms/Vectorize/VPRecipeBuilder.h