diff options
author | Caroline Concatto <caroline.concatto@arm.com> | 2021-01-04 15:21:21 +0000 |
---|---|---|
committer | Caroline Concatto <caroline.concatto@arm.com> | 2021-01-18 13:37:21 +0000 |
commit | 36710c38c1b741ff9cc70060893d53fc24c07833 (patch) | |
tree | c04c92af2ea306b012a176839c9db2b3cf02b623 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | |
parent | 9399681a57cef143dc4d087706947a03af819ef5 (diff) | |
download | llvm-36710c38c1b741ff9cc70060893d53fc24c07833.zip llvm-36710c38c1b741ff9cc70060893d53fc24c07833.tar.gz llvm-36710c38c1b741ff9cc70060893d53fc24c07833.tar.bz2 |
[NFC]Migrate VectorCombine.cpp to use InstructionCost
This patch changes these functions:
vectorizeLoadInsert
isExtractExtractCheap
foldExtractedCmps
scalarizeBinopOrCmp
getShuffleExtract
foldBitcastShuf
to use the class InstructionCost when calling TTI.get<something>Cost().
This patch is part of a series of patches to use InstructionCost instead of
unsigned/int for the cost model functions.
See this thread for context:
http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html
See this patch for the introduction of the type:
https://reviews.llvm.org/D91174
ps.:This patch adds the test || !NewCost.isValid(), because we want to
return false when:
!NewCost.isValid && !OldCost.isValid()->the cost to transform it expensive
and
!NewCost.isValid() && OldCost.isValid()
Therefore for simplication we only add test for !NewCost.isValid()
Differential Revision: https://reviews.llvm.org/D94069
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions