[PATCH] D49225: [SLPVectorizer] Move scalar/vector costs to helper functions (NFCI).

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 17 03:59:17 PDT 2018


RKSimon added a comment.

I think the use of TTI->getInstructionCost in getScalarCost would be quite straightforward - it is getVectorCost that will need most of the custom handling as we're manipulating scalar Instructions to query equivalent vector costs.

IMO we're better off using the getScalarCost/getVectorCost abstractions instead of embedding TTI->getInstructionCost calls directly inside BoUpSLP::getEntryCost - it notably helps simplify the code and improves readability.


Repository:
  rL LLVM

https://reviews.llvm.org/D49225





More information about the llvm-commits mailing list