[PATCH] D33359: [LoopIdiom] Refactor return value of LoopIdiomRecognize::isLegalStore

Daniel Neilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 09:26:21 PDT 2017


dneilson created this revision.
Herald added a subscriber: mzolotukhin.

This is a NFC.

This change simply refactors the return value of LoopIdiomRecognize::isLegalStore() from bool to an enumeration, and removes the return-through-parameter mechanism that the function was using. This function is constructed such that it will only ever recognize a single store idiom (memset, memset_pattern, or memcpy), and never a combination of these. As such it makes much more sense for the return value to be the single idiom that the store matches, rather than having a separate argument-return for each idiom -- it's cleaner, and makes it clearer that only a single idiom can be matched.


https://reviews.llvm.org/D33359

Files:
  lib/Transforms/Scalar/LoopIdiomRecognize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33359.99573.patch
Type: text/x-patch
Size: 6013 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170519/58746f03/attachment.bin>


More information about the llvm-commits mailing list