[all-commits] [llvm/llvm-project] 36710c: [NFC]Migrate VectorCombine.cpp to use InstructionCost
CarolineConcatto via All-commits
all-commits at lists.llvm.org
Mon Jan 18 05:51:04 PST 2021
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 36710c38c1b741ff9cc70060893d53fc24c07833
https://github.com/llvm/llvm-project/commit/36710c38c1b741ff9cc70060893d53fc24c07833
Author: Caroline Concatto <caroline.concatto at arm.com>
Date: 2021-01-18 (Mon, 18 Jan 2021)
Changed paths:
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list