[PATCH] D154114: [SLP] Provide an universal interface for FixedVectorType::get. NFC.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 12:00:44 PDT 2023


vdmitrie added inline comments.
Herald added a subscriber: wangpc.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1082
 
+static FixedVectorType *makeScalarTyToVectorTy(Type *ScalarTy, unsigned VF) {
+  return FixedVectorType::get(ScalarTy, VF);
----------------
my 2 cents

Based on recent comment this is going to be extended to handle vector type as well. In this regard name of the function is not going to sound accurate for its purpose.
I'd suggest to change its signature into something like
FixedVectorType *getWidenedType(const Type *Ty, unsigned VF)

and perhaps place it into
llvm/include/llvm/Analysis/VectorUtils.h
llvm/lib/Analysis/VectorUtils.cpp



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154114/new/

https://reviews.llvm.org/D154114



More information about the llvm-commits mailing list