[PATCH] D94069: [NFC]Migrate VectorCombine.cpp to use InstructionCost
Caroline via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 01:09:09 PST 2021
CarolineConcatto created this revision.
Herald added a subscriber: hiraditya.
CarolineConcatto requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch changes these functions:
vectorizeLoadInsert
isExtractExtractCheap
foldExtractedCmps
scalarizeBinopOrCmp
getShuffleExtract
foldBitcastShuf
to use the class InstructionCost when calling TTI.get<something>Cost().
In this patch OldCost needs to be valid to continue, otherwise, it asserts.
NewCost means that the new set of instructions is not possible therefore should
keep with OldCost. However, since we don't yet return invalid costs from any of
the TTI implementations these asserts should not fire.
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94069
Files:
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94069.314523.patch
Type: text/x-patch
Size: 8508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210105/059754f8/attachment-0001.bin>
More information about the llvm-commits
mailing list