[PATCH] D49225: [SLPVectorizer] Move scalar/vector costs to helper functions (NFCI).
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 16 13:35:31 PDT 2018
ABataev added inline comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:609-610
+ /// \returns the cost of the scalar instruction \p I.
+ int getScalarCost(Instruction *I, Type *DstSclTy);
+
----------------
RKSimon wrote:
> ABataev wrote:
> > Can we just use `TTI->getInstructionCost(I, TargetTransformInfo::TCK_RecipThroughput);` instead of this function?
> I've kept more closely to the original code than might be necessary - more of the instructions could use TTI->getInstructionCost directly in the switch statements - but enums like GEP and Cast have minor diffs that we seem to be relying on....
Can we use this for load, store and calls?
Repository:
rL LLVM
https://reviews.llvm.org/D49225
More information about the llvm-commits
mailing list