[PATCH] D106140: [LV] Change interface of getReductionPatternCost to return Optional

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 03:43:34 PDT 2021


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, sdesmalen, david-arm, spatel, RKSimon.
Herald added a subscriber: hiraditya.
dmgreen requested review of this revision.
Herald added a project: LLVM.

Currently the Instruction cost of getReductionPatternCost returns an Invalid cost to specify "did not find the pattern". This changes that to return an Optional with None specifying not found, allowing Invalid to mean an infinite cost as is used elsewhere.


https://reviews.llvm.org/D106140

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106140.359274.patch
Type: text/x-patch
Size: 4395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210716/8512a0f7/attachment.bin>


More information about the llvm-commits mailing list